Skip to content

protobuf: Add Message.FromString static method. #3327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion third_party/2and3/google/protobuf/message.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Sequence, Optional, Tuple
from typing import Any, Sequence, Optional, Tuple, Type, TypeVar

from .descriptor import (
DescriptorBase,
Expand All @@ -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=...): ...
Expand All @@ -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: ...

Expand Down