diff --git a/third_party/2and3/google/protobuf/message.pyi b/third_party/2and3/google/protobuf/message.pyi index 60bcf8a67..62e9a329f 100644 --- a/third_party/2and3/google/protobuf/message.pyi +++ b/third_party/2and3/google/protobuf/message.pyi @@ -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: ...