mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
protobuf: Add Message.FromString static method. (#3327)
This commit is contained in:
committed by
Sebastian Rittau
parent
4027add6b3
commit
50961d45a1
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Sequence, Optional, Tuple
|
||||
from typing import Any, Sequence, Optional, Tuple, Type, TypeVar
|
||||
|
||||
from .descriptor import (
|
||||
DescriptorBase,
|
||||
@@ -13,6 +13,8 @@ class _ExtensionDict:
|
||||
def __getitem__(self, extension_handle: DescriptorBase) -> Any: ...
|
||||
def __setitem__(self, extension_handle: DescriptorBase, value: Any) -> None: ...
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class Message:
|
||||
DESCRIPTOR: Any
|
||||
def __deepcopy__(self, memo=...): ...
|
||||
@@ -31,6 +33,8 @@ class Message:
|
||||
def HasExtension(self, extension_handle): ...
|
||||
def ClearExtension(self, extension_handle): ...
|
||||
def ByteSize(self) -> int: ...
|
||||
@classmethod
|
||||
def FromString(cls: Type[_T], s: Any) -> _T: ...
|
||||
@property
|
||||
def Extensions(self) -> _ExtensionDict: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user