mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 04:04:25 +08:00
Annotate extension methods in protobuf message (#4706)
This commit is contained in:
@@ -2,7 +2,7 @@ import sys
|
||||
from typing import Any, ByteString, Sequence, Tuple, Type, TypeVar, Union
|
||||
|
||||
from .descriptor import Descriptor, FieldDescriptor
|
||||
from .internal.extension_dict import _ExtensionDict
|
||||
from .internal.extension_dict import _ExtensionDict, _ExtensionFieldDescriptor
|
||||
|
||||
class Error(Exception): ...
|
||||
class DecodeError(Error): ...
|
||||
@@ -30,8 +30,8 @@ class Message:
|
||||
def SerializeToString(self, deterministic: bool = ...) -> bytes: ...
|
||||
def SerializePartialToString(self, deterministic: bool = ...) -> bytes: ...
|
||||
def ListFields(self) -> Sequence[Tuple[FieldDescriptor, Any]]: ...
|
||||
def HasExtension(self, extension_handle): ...
|
||||
def ClearExtension(self, extension_handle): ...
|
||||
def HasExtension(self: _M, extension_handle: _ExtensionFieldDescriptor[_M, Any]) -> bool: ...
|
||||
def ClearExtension(self: _M, extension_handle: _ExtensionFieldDescriptor[_M, Any]) -> None: ...
|
||||
def ByteSize(self) -> int: ...
|
||||
@classmethod
|
||||
def FromString(cls: Type[_M], s: _Serialized) -> _M: ...
|
||||
|
||||
Reference in New Issue
Block a user