From 036abc7fda9290e29d978d62b00e03b67a2a6fd1 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 10 Oct 2019 23:28:28 -0700 Subject: [PATCH] protobuf: Narrow type of Message.FromString. (#3340) Remove unnecessary definitions in sub-classes. --- third_party/2and3/google/protobuf/any_pb2.pyi | 4 +- .../2and3/google/protobuf/any_test_pb2.pyi | 4 +- third_party/2and3/google/protobuf/api_pb2.pyi | 10 +- .../google/protobuf/compiler/plugin_pb2.pyi | 14 +- .../2and3/google/protobuf/descriptor_pb2.pyi | 93 +---- .../2and3/google/protobuf/duration_pb2.pyi | 4 +- .../2and3/google/protobuf/empty_pb2.pyi | 4 +- .../2and3/google/protobuf/field_mask_pb2.pyi | 4 +- .../protobuf/map_proto2_unittest_pb2.pyi | 73 +--- .../google/protobuf/map_unittest_pb2.pyi | 168 +------- third_party/2and3/google/protobuf/message.pyi | 2 +- .../google/protobuf/source_context_pb2.pyi | 4 +- .../2and3/google/protobuf/struct_pb2.pyi | 13 +- .../protobuf/test_messages_proto2_pb2.pyi | 164 +------- .../protobuf/test_messages_proto3_pb2.pyi | 131 +----- .../2and3/google/protobuf/timestamp_pb2.pyi | 4 +- .../2and3/google/protobuf/type_pb2.pyi | 16 +- .../google/protobuf/unittest_arena_pb2.pyi | 7 +- .../protobuf/unittest_custom_options_pb2.pyi | 89 +--- .../google/protobuf/unittest_import_pb2.pyi | 4 +- .../protobuf/unittest_import_public_pb2.pyi | 4 +- .../google/protobuf/unittest_mset_pb2.pyi | 16 +- .../unittest_mset_wire_format_pb2.pyi | 7 +- .../protobuf/unittest_no_arena_import_pb2.pyi | 4 +- .../google/protobuf/unittest_no_arena_pb2.pyi | 82 +--- .../unittest_no_generic_services_pb2.pyi | 4 +- .../2and3/google/protobuf/unittest_pb2.pyi | 388 +----------------- .../protobuf/unittest_proto3_arena_pb2.pyi | 63 +-- .../protobuf/util/json_format_proto3_pb2.pyi | 95 +---- .../2and3/google/protobuf/wrappers_pb2.pyi | 28 +- 30 files changed, 30 insertions(+), 1473 deletions(-) diff --git a/third_party/2and3/google/protobuf/any_pb2.pyi b/third_party/2and3/google/protobuf/any_pb2.pyi index c2a7295a9..667acf070 100644 --- a/third_party/2and3/google/protobuf/any_pb2.pyi +++ b/third_party/2and3/google/protobuf/any_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -17,6 +18,3 @@ class Any(Message, well_known_types.Any_): type_url: Optional[Text] = ..., value: Optional[bytes] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> Any: ... diff --git a/third_party/2and3/google/protobuf/any_test_pb2.pyi b/third_party/2and3/google/protobuf/any_test_pb2.pyi index d352badb3..f1ac04db8 100644 --- a/third_party/2and3/google/protobuf/any_test_pb2.pyi +++ b/third_party/2and3/google/protobuf/any_test_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.any_pb2 import ( Any, ) @@ -27,6 +28,3 @@ class TestAny(Message): any_value: Optional[Any] = ..., repeated_any_value: Optional[Iterable[Any]] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> TestAny: ... diff --git a/third_party/2and3/google/protobuf/api_pb2.pyi b/third_party/2and3/google/protobuf/api_pb2.pyi index 36468780e..6f4d791f4 100644 --- a/third_party/2and3/google/protobuf/api_pb2.pyi +++ b/third_party/2and3/google/protobuf/api_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.internal.containers import ( RepeatedCompositeFieldContainer, ) @@ -45,9 +46,6 @@ class Api(Message): syntax: Optional[Syntax] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Api: ... - class Method(Message): name: Text @@ -70,9 +68,6 @@ class Method(Message): syntax: Optional[Syntax] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Method: ... - class Mixin(Message): name: Text @@ -82,6 +77,3 @@ class Mixin(Message): name: Optional[Text] = ..., root: Optional[Text] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> Mixin: ... diff --git a/third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi b/third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi index d1037fa3a..63667b05c 100644 --- a/third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi +++ b/third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.descriptor_pb2 import ( FileDescriptorProto, ) @@ -28,9 +29,6 @@ class Version(Message): suffix: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Version: ... - class CodeGeneratorRequest(Message): file_to_generate: RepeatedScalarFieldContainer[Text] @@ -49,9 +47,6 @@ class CodeGeneratorRequest(Message): compiler_version: Optional[Version] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> CodeGeneratorRequest: ... - class CodeGeneratorResponse(Message): @@ -66,10 +61,6 @@ class CodeGeneratorResponse(Message): content: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> CodeGeneratorResponse.File: ... - error: Text - @property def file(self) -> RepeatedCompositeFieldContainer[CodeGeneratorResponse.File]: ... @@ -77,6 +68,3 @@ class CodeGeneratorResponse(Message): error: Optional[Text] = ..., file: Optional[Iterable[CodeGeneratorResponse.File]] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> CodeGeneratorResponse: ... diff --git a/third_party/2and3/google/protobuf/descriptor_pb2.pyi b/third_party/2and3/google/protobuf/descriptor_pb2.pyi index d0fbcdc2f..540f7218c 100644 --- a/third_party/2and3/google/protobuf/descriptor_pb2.pyi +++ b/third_party/2and3/google/protobuf/descriptor_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.internal.containers import ( RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer, @@ -24,9 +25,6 @@ class FileDescriptorSet(Message): file: Optional[Iterable[FileDescriptorProto]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> FileDescriptorSet: ... - class FileDescriptorProto(Message): name: Text @@ -73,9 +71,6 @@ class FileDescriptorProto(Message): syntax: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> FileDescriptorProto: ... - class DescriptorProto(Message): @@ -92,9 +87,6 @@ class DescriptorProto(Message): options: Optional[ExtensionRangeOptions] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> DescriptorProto.ExtensionRange: ... - class ReservedRange(Message): start: int end: int @@ -104,11 +96,6 @@ class DescriptorProto(Message): end: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> DescriptorProto.ReservedRange: ... - name: Text - reserved_name: RepeatedScalarFieldContainer[Text] - @property def field( self) -> RepeatedCompositeFieldContainer[FieldDescriptorProto]: ... @@ -153,9 +140,6 @@ class DescriptorProto(Message): reserved_name: Optional[Iterable[Text]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> DescriptorProto: ... - class ExtensionRangeOptions(Message): @@ -167,9 +151,6 @@ class ExtensionRangeOptions(Message): uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> ExtensionRangeOptions: ... - class FieldDescriptorProto(Message): @@ -253,9 +234,6 @@ class FieldDescriptorProto(Message): options: Optional[FieldOptions] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> FieldDescriptorProto: ... - class OneofDescriptorProto(Message): name: Text @@ -268,9 +246,6 @@ class OneofDescriptorProto(Message): options: Optional[OneofOptions] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> OneofDescriptorProto: ... - class EnumDescriptorProto(Message): @@ -283,12 +258,6 @@ class EnumDescriptorProto(Message): end: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> EnumDescriptorProto.EnumReservedRange: ... - name: Text - reserved_name: RepeatedScalarFieldContainer[Text] - @property def value( self) -> RepeatedCompositeFieldContainer[EnumValueDescriptorProto]: ... @@ -308,9 +277,6 @@ class EnumDescriptorProto(Message): reserved_name: Optional[Iterable[Text]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> EnumDescriptorProto: ... - class EnumValueDescriptorProto(Message): name: Text @@ -325,9 +291,6 @@ class EnumValueDescriptorProto(Message): options: Optional[EnumValueOptions] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> EnumValueDescriptorProto: ... - class ServiceDescriptorProto(Message): name: Text @@ -345,9 +308,6 @@ class ServiceDescriptorProto(Message): options: Optional[ServiceOptions] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> ServiceDescriptorProto: ... - class MethodDescriptorProto(Message): name: Text @@ -368,9 +328,6 @@ class MethodDescriptorProto(Message): server_streaming: Optional[bool] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> MethodDescriptorProto: ... - class FileOptions(Message): @@ -438,9 +395,6 @@ class FileOptions(Message): uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> FileOptions: ... - class MessageOptions(Message): message_set_wire_format: bool @@ -460,9 +414,6 @@ class MessageOptions(Message): uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> MessageOptions: ... - class FieldOptions(Message): @@ -526,9 +477,6 @@ class FieldOptions(Message): uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> FieldOptions: ... - class OneofOptions(Message): @@ -540,9 +488,6 @@ class OneofOptions(Message): uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> OneofOptions: ... - class EnumOptions(Message): allow_alias: bool @@ -558,9 +503,6 @@ class EnumOptions(Message): uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> EnumOptions: ... - class EnumValueOptions(Message): deprecated: bool @@ -574,9 +516,6 @@ class EnumValueOptions(Message): uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> EnumValueOptions: ... - class ServiceOptions(Message): deprecated: bool @@ -590,9 +529,6 @@ class ServiceOptions(Message): uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> ServiceOptions: ... - class MethodOptions(Message): @@ -628,9 +564,6 @@ class MethodOptions(Message): uninterpreted_option: Optional[Iterable[UninterpretedOption]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> MethodOptions: ... - class UninterpretedOption(Message): @@ -643,15 +576,6 @@ class UninterpretedOption(Message): is_extension: bool, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> UninterpretedOption.NamePart: ... - identifier_value: Text - positive_int_value: int - negative_int_value: int - double_value: float - string_value: bytes - aggregate_value: Text - @property def name( self) -> RepeatedCompositeFieldContainer[UninterpretedOption.NamePart]: ... @@ -666,9 +590,6 @@ class UninterpretedOption(Message): aggregate_value: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> UninterpretedOption: ... - class SourceCodeInfo(Message): @@ -687,9 +608,6 @@ class SourceCodeInfo(Message): leading_detached_comments: Optional[Iterable[Text]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> SourceCodeInfo.Location: ... - @property def location( self) -> RepeatedCompositeFieldContainer[SourceCodeInfo.Location]: ... @@ -698,9 +616,6 @@ class SourceCodeInfo(Message): location: Optional[Iterable[SourceCodeInfo.Location]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> SourceCodeInfo: ... - class GeneratedCodeInfo(Message): @@ -717,9 +632,6 @@ class GeneratedCodeInfo(Message): end: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> GeneratedCodeInfo.Annotation: ... - @property def annotation( self) -> RepeatedCompositeFieldContainer[GeneratedCodeInfo.Annotation]: ... @@ -727,6 +639,3 @@ class GeneratedCodeInfo(Message): def __init__(self, annotation: Optional[Iterable[GeneratedCodeInfo.Annotation]] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> GeneratedCodeInfo: ... diff --git a/third_party/2and3/google/protobuf/duration_pb2.pyi b/third_party/2and3/google/protobuf/duration_pb2.pyi index 378c2e57c..b617ac7a8 100644 --- a/third_party/2and3/google/protobuf/duration_pb2.pyi +++ b/third_party/2and3/google/protobuf/duration_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -16,6 +17,3 @@ class Duration(Message, well_known_types.Duration): seconds: Optional[int] = ..., nanos: Optional[int] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> Duration: ... diff --git a/third_party/2and3/google/protobuf/empty_pb2.pyi b/third_party/2and3/google/protobuf/empty_pb2.pyi index 295ebfa93..e14a141ec 100644 --- a/third_party/2and3/google/protobuf/empty_pb2.pyi +++ b/third_party/2and3/google/protobuf/empty_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -7,6 +8,3 @@ class Empty(Message): def __init__(self, ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> Empty: ... diff --git a/third_party/2and3/google/protobuf/field_mask_pb2.pyi b/third_party/2and3/google/protobuf/field_mask_pb2.pyi index 1c96a02bb..140824322 100644 --- a/third_party/2and3/google/protobuf/field_mask_pb2.pyi +++ b/third_party/2and3/google/protobuf/field_mask_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.internal.containers import ( RepeatedScalarFieldContainer, ) @@ -19,6 +20,3 @@ class FieldMask(Message, well_known_types.FieldMask): def __init__(self, paths: Optional[Iterable[Text]] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> FieldMask: ... diff --git a/third_party/2and3/google/protobuf/map_proto2_unittest_pb2.pyi b/third_party/2and3/google/protobuf/map_proto2_unittest_pb2.pyi index fd12d108a..9a589625f 100644 --- a/third_party/2and3/google/protobuf/map_proto2_unittest_pb2.pyi +++ b/third_party/2and3/google/protobuf/map_proto2_unittest_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -69,9 +70,6 @@ class TestEnumMap(Message): value: Optional[Proto2MapEnum] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestEnumMap.KnownMapFieldEntry: ... - class UnknownMapFieldEntry(Message): key: int value: Proto2MapEnum @@ -81,9 +79,6 @@ class TestEnumMap(Message): value: Optional[Proto2MapEnum] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestEnumMap.UnknownMapFieldEntry: ... - @property def known_map_field(self) -> MutableMapping[int, Proto2MapEnum]: ... @@ -95,9 +90,6 @@ class TestEnumMap(Message): unknown_map_field: Optional[Mapping[int, Proto2MapEnum]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestEnumMap: ... - class TestEnumMapPlusExtra(Message): @@ -110,9 +102,6 @@ class TestEnumMapPlusExtra(Message): value: Optional[Proto2MapEnumPlusExtra] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestEnumMapPlusExtra.KnownMapFieldEntry: ... - class UnknownMapFieldEntry(Message): key: int value: Proto2MapEnumPlusExtra @@ -122,9 +111,6 @@ class TestEnumMapPlusExtra(Message): value: Optional[Proto2MapEnumPlusExtra] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestEnumMapPlusExtra.UnknownMapFieldEntry: ... - @property def known_map_field(self) -> MutableMapping[int, Proto2MapEnumPlusExtra]: ... @@ -136,9 +122,6 @@ class TestEnumMapPlusExtra(Message): unknown_map_field: Optional[Mapping[int, Proto2MapEnumPlusExtra]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestEnumMapPlusExtra: ... - class TestImportEnumMap(Message): @@ -151,9 +134,6 @@ class TestImportEnumMap(Message): value: Optional[ImportEnumForMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestImportEnumMap.ImportEnumAmpEntry: ... - @property def import_enum_amp(self) -> MutableMapping[int, ImportEnumForMap]: ... @@ -161,9 +141,6 @@ class TestImportEnumMap(Message): import_enum_amp: Optional[Mapping[int, ImportEnumForMap]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestImportEnumMap: ... - class TestIntIntMap(Message): @@ -176,9 +153,6 @@ class TestIntIntMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestIntIntMap.MEntry: ... - @property def m(self) -> MutableMapping[int, int]: ... @@ -186,9 +160,6 @@ class TestIntIntMap(Message): m: Optional[Mapping[int, int]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestIntIntMap: ... - class TestMaps(Message): @@ -203,9 +174,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MInt32Entry: ... - class MInt64Entry(Message): key: int @@ -217,9 +185,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MInt64Entry: ... - class MUint32Entry(Message): key: int @@ -231,9 +196,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MUint32Entry: ... - class MUint64Entry(Message): key: int @@ -245,9 +207,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MUint64Entry: ... - class MSint32Entry(Message): key: int @@ -259,9 +218,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MSint32Entry: ... - class MSint64Entry(Message): key: int @@ -273,9 +229,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MSint64Entry: ... - class MFixed32Entry(Message): key: int @@ -287,9 +240,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MFixed32Entry: ... - class MFixed64Entry(Message): key: int @@ -301,9 +251,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MFixed64Entry: ... - class MSfixed32Entry(Message): key: int @@ -315,9 +262,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MSfixed32Entry: ... - class MSfixed64Entry(Message): key: int @@ -329,9 +273,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MSfixed64Entry: ... - class MBoolEntry(Message): key: bool @@ -343,9 +284,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MBoolEntry: ... - class MStringEntry(Message): key: Text @@ -357,9 +295,6 @@ class TestMaps(Message): value: Optional[TestIntIntMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps.MStringEntry: ... - @property def m_int32(self) -> MutableMapping[int, TestIntIntMap]: ... @@ -411,9 +346,6 @@ class TestMaps(Message): m_string: Optional[Mapping[Text, TestIntIntMap]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMaps: ... - class TestSubmessageMaps(Message): @@ -423,6 +355,3 @@ class TestSubmessageMaps(Message): def __init__(self, m: Optional[TestMaps] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> TestSubmessageMaps: ... diff --git a/third_party/2and3/google/protobuf/map_unittest_pb2.pyi b/third_party/2and3/google/protobuf/map_unittest_pb2.pyi index 25058bbde..cf65da3dc 100644 --- a/third_party/2and3/google/protobuf/map_unittest_pb2.pyi +++ b/third_party/2and3/google/protobuf/map_unittest_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -54,9 +55,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapInt32Int32Entry: ... - class MapInt64Int64Entry(Message): key: int value: int @@ -66,9 +64,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapInt64Int64Entry: ... - class MapUint32Uint32Entry(Message): key: int value: int @@ -78,9 +73,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapUint32Uint32Entry: ... - class MapUint64Uint64Entry(Message): key: int value: int @@ -90,9 +82,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapUint64Uint64Entry: ... - class MapSint32Sint32Entry(Message): key: int value: int @@ -102,9 +91,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapSint32Sint32Entry: ... - class MapSint64Sint64Entry(Message): key: int value: int @@ -114,9 +100,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapSint64Sint64Entry: ... - class MapFixed32Fixed32Entry(Message): key: int value: int @@ -126,9 +109,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapFixed32Fixed32Entry: ... - class MapFixed64Fixed64Entry(Message): key: int value: int @@ -138,9 +118,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapFixed64Fixed64Entry: ... - class MapSfixed32Sfixed32Entry(Message): key: int value: int @@ -150,9 +127,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapSfixed32Sfixed32Entry: ... - class MapSfixed64Sfixed64Entry(Message): key: int value: int @@ -162,9 +136,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapSfixed64Sfixed64Entry: ... - class MapInt32FloatEntry(Message): key: int value: float @@ -174,9 +145,6 @@ class TestMap(Message): value: Optional[float] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapInt32FloatEntry: ... - class MapInt32DoubleEntry(Message): key: int value: float @@ -186,9 +154,6 @@ class TestMap(Message): value: Optional[float] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapInt32DoubleEntry: ... - class MapBoolBoolEntry(Message): key: bool value: bool @@ -198,9 +163,6 @@ class TestMap(Message): value: Optional[bool] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapBoolBoolEntry: ... - class MapStringStringEntry(Message): key: Text value: Text @@ -210,9 +172,6 @@ class TestMap(Message): value: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapStringStringEntry: ... - class MapInt32BytesEntry(Message): key: int value: bytes @@ -222,9 +181,6 @@ class TestMap(Message): value: Optional[bytes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapInt32BytesEntry: ... - class MapInt32EnumEntry(Message): key: int value: MapEnum @@ -234,9 +190,6 @@ class TestMap(Message): value: Optional[MapEnum] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapInt32EnumEntry: ... - class MapInt32ForeignMessageEntry(Message): key: int @@ -248,9 +201,6 @@ class TestMap(Message): value: Optional[ForeignMessage1] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapInt32ForeignMessageEntry: ... - class MapStringForeignMessageEntry(Message): key: Text @@ -262,10 +212,6 @@ class TestMap(Message): value: Optional[ForeignMessage1] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestMap.MapStringForeignMessageEntry: ... - class MapInt32AllTypesEntry(Message): key: int @@ -277,9 +223,6 @@ class TestMap(Message): value: Optional[TestAllTypes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.MapInt32AllTypesEntry: ... - @property def map_int32_int32(self) -> MutableMapping[int, int]: ... @@ -361,9 +304,6 @@ class TestMap(Message): map_int32_all_types: Optional[Mapping[int, TestAllTypes]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap: ... - class TestMapSubmessage(Message): @@ -374,9 +314,6 @@ class TestMapSubmessage(Message): test_map: Optional[TestMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMapSubmessage: ... - class TestMessageMap(Message): @@ -391,9 +328,6 @@ class TestMessageMap(Message): value: Optional[TestAllTypes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMessageMap.MapInt32MessageEntry: ... - @property def map_int32_message(self) -> MutableMapping[int, TestAllTypes]: ... @@ -401,9 +335,6 @@ class TestMessageMap(Message): map_int32_message: Optional[Mapping[int, TestAllTypes]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMessageMap: ... - class TestSameTypeMap(Message): @@ -416,9 +347,6 @@ class TestSameTypeMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestSameTypeMap.Map1Entry: ... - class Map2Entry(Message): key: int value: int @@ -428,9 +356,6 @@ class TestSameTypeMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestSameTypeMap.Map2Entry: ... - @property def map1(self) -> MutableMapping[int, int]: ... @@ -442,9 +367,6 @@ class TestSameTypeMap(Message): map2: Optional[Mapping[int, int]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestSameTypeMap: ... - class TestRequiredMessageMap(Message): @@ -459,10 +381,6 @@ class TestRequiredMessageMap(Message): value: Optional[TestRequired] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestRequiredMessageMap.MapFieldEntry: ... - @property def map_field(self) -> MutableMapping[int, TestRequired]: ... @@ -470,9 +388,6 @@ class TestRequiredMessageMap(Message): map_field: Optional[Mapping[int, TestRequired]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestRequiredMessageMap: ... - class TestArenaMap(Message): @@ -485,9 +400,6 @@ class TestArenaMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapInt32Int32Entry: ... - class MapInt64Int64Entry(Message): key: int value: int @@ -497,9 +409,6 @@ class TestArenaMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapInt64Int64Entry: ... - class MapUint32Uint32Entry(Message): key: int value: int @@ -509,9 +418,6 @@ class TestArenaMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapUint32Uint32Entry: ... - class MapUint64Uint64Entry(Message): key: int value: int @@ -521,9 +427,6 @@ class TestArenaMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapUint64Uint64Entry: ... - class MapSint32Sint32Entry(Message): key: int value: int @@ -533,9 +436,6 @@ class TestArenaMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapSint32Sint32Entry: ... - class MapSint64Sint64Entry(Message): key: int value: int @@ -545,9 +445,6 @@ class TestArenaMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapSint64Sint64Entry: ... - class MapFixed32Fixed32Entry(Message): key: int value: int @@ -557,9 +454,6 @@ class TestArenaMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapFixed32Fixed32Entry: ... - class MapFixed64Fixed64Entry(Message): key: int value: int @@ -569,9 +463,6 @@ class TestArenaMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapFixed64Fixed64Entry: ... - class MapSfixed32Sfixed32Entry(Message): key: int value: int @@ -581,10 +472,6 @@ class TestArenaMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestArenaMap.MapSfixed32Sfixed32Entry: ... - class MapSfixed64Sfixed64Entry(Message): key: int value: int @@ -594,10 +481,6 @@ class TestArenaMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestArenaMap.MapSfixed64Sfixed64Entry: ... - class MapInt32FloatEntry(Message): key: int value: float @@ -607,9 +490,6 @@ class TestArenaMap(Message): value: Optional[float] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapInt32FloatEntry: ... - class MapInt32DoubleEntry(Message): key: int value: float @@ -619,9 +499,6 @@ class TestArenaMap(Message): value: Optional[float] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapInt32DoubleEntry: ... - class MapBoolBoolEntry(Message): key: bool value: bool @@ -631,9 +508,6 @@ class TestArenaMap(Message): value: Optional[bool] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapBoolBoolEntry: ... - class MapStringStringEntry(Message): key: Text value: Text @@ -643,9 +517,6 @@ class TestArenaMap(Message): value: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapStringStringEntry: ... - class MapInt32BytesEntry(Message): key: int value: bytes @@ -655,9 +526,6 @@ class TestArenaMap(Message): value: Optional[bytes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapInt32BytesEntry: ... - class MapInt32EnumEntry(Message): key: int value: MapEnum @@ -667,9 +535,6 @@ class TestArenaMap(Message): value: Optional[MapEnum] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap.MapInt32EnumEntry: ... - class MapInt32ForeignMessageEntry(Message): key: int @@ -681,10 +546,6 @@ class TestArenaMap(Message): value: Optional[ForeignMessage1] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestArenaMap.MapInt32ForeignMessageEntry: ... - class MapInt32ForeignMessageNoArenaEntry(Message): key: int @@ -696,10 +557,6 @@ class TestArenaMap(Message): value: Optional[ForeignMessage] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestArenaMap.MapInt32ForeignMessageNoArenaEntry: ... - @property def map_int32_int32(self) -> MutableMapping[int, int]: ... @@ -777,9 +634,6 @@ class TestArenaMap(Message): map_int32_foreign_message_no_arena: Optional[Mapping[int, ForeignMessage]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestArenaMap: ... - class MessageContainingEnumCalledType(Message): @@ -813,10 +667,6 @@ class MessageContainingEnumCalledType(Message): value: Optional[MessageContainingEnumCalledType] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> MessageContainingEnumCalledType.TypeEntry: ... - @property def type(self) -> MutableMapping[Text, MessageContainingEnumCalledType]: ... @@ -825,9 +675,6 @@ class MessageContainingEnumCalledType(Message): type: Optional[Mapping[Text, MessageContainingEnumCalledType]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> MessageContainingEnumCalledType: ... - class MessageContainingMapCalledEntry(Message): @@ -840,10 +687,6 @@ class MessageContainingMapCalledEntry(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> MessageContainingMapCalledEntry.EntryEntry: ... - @property def entry(self) -> MutableMapping[int, int]: ... @@ -851,9 +694,6 @@ class MessageContainingMapCalledEntry(Message): entry: Optional[Mapping[int, int]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> MessageContainingMapCalledEntry: ... - class TestRecursiveMapMessage(Message): @@ -868,15 +708,9 @@ class TestRecursiveMapMessage(Message): value: Optional[TestRecursiveMapMessage] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestRecursiveMapMessage.AEntry: ... - @property def a(self) -> MutableMapping[Text, TestRecursiveMapMessage]: ... def __init__(self, a: Optional[Mapping[Text, TestRecursiveMapMessage]] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> TestRecursiveMapMessage: ... diff --git a/third_party/2and3/google/protobuf/message.pyi b/third_party/2and3/google/protobuf/message.pyi index 2265e0356..59a0b5bd3 100644 --- a/third_party/2and3/google/protobuf/message.pyi +++ b/third_party/2and3/google/protobuf/message.pyi @@ -41,7 +41,7 @@ class Message: def ClearExtension(self, extension_handle): ... def ByteSize(self) -> int: ... @classmethod - def FromString(cls: Type[_T], s: Any) -> _T: ... + def FromString(cls: Type[_T], s: _Serialized) -> _T: ... @property def Extensions(self) -> _ExtensionDict: ... diff --git a/third_party/2and3/google/protobuf/source_context_pb2.pyi b/third_party/2and3/google/protobuf/source_context_pb2.pyi index 527ac1a4f..50c08501d 100644 --- a/third_party/2and3/google/protobuf/source_context_pb2.pyi +++ b/third_party/2and3/google/protobuf/source_context_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -13,6 +14,3 @@ class SourceContext(Message): def __init__(self, file_name: Optional[Text] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> SourceContext: ... diff --git a/third_party/2and3/google/protobuf/struct_pb2.pyi b/third_party/2and3/google/protobuf/struct_pb2.pyi index 21afcc71b..84bf41d3e 100644 --- a/third_party/2and3/google/protobuf/struct_pb2.pyi +++ b/third_party/2and3/google/protobuf/struct_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.internal.containers import ( RepeatedCompositeFieldContainer, ) @@ -50,9 +51,6 @@ class Struct(Message, well_known_types.Struct): value: Optional[Value] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Struct.FieldsEntry: ... - @property def fields(self) -> MutableMapping[Text, Value]: ... @@ -60,9 +58,6 @@ class Struct(Message, well_known_types.Struct): fields: Optional[Mapping[Text, Value]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Struct: ... - class _Value(Message): null_value: NullValue @@ -85,9 +80,6 @@ class _Value(Message): list_value: Optional[ListValue] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> _Value: ... - Value = _Value @@ -100,6 +92,3 @@ class ListValue(Message, well_known_types.ListValue): def __init__(self, values: Optional[Iterable[Value]] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> ListValue: ... diff --git a/third_party/2and3/google/protobuf/test_messages_proto2_pb2.pyi b/third_party/2and3/google/protobuf/test_messages_proto2_pb2.pyi index 03e34be76..812227b00 100644 --- a/third_party/2and3/google/protobuf/test_messages_proto2_pb2.pyi +++ b/third_party/2and3/google/protobuf/test_messages_proto2_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.internal.containers import ( RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer, @@ -75,9 +76,6 @@ class TestAllTypesProto2(Message): corecursive: Optional[TestAllTypesProto2] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto2.NestedMessage: ... - class MapInt32Int32Entry(Message): key: int value: int @@ -87,10 +85,6 @@ class TestAllTypesProto2(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapInt32Int32Entry: ... - class MapInt64Int64Entry(Message): key: int value: int @@ -100,10 +94,6 @@ class TestAllTypesProto2(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapInt64Int64Entry: ... - class MapUint32Uint32Entry(Message): key: int value: int @@ -113,10 +103,6 @@ class TestAllTypesProto2(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapUint32Uint32Entry: ... - class MapUint64Uint64Entry(Message): key: int value: int @@ -126,10 +112,6 @@ class TestAllTypesProto2(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapUint64Uint64Entry: ... - class MapSint32Sint32Entry(Message): key: int value: int @@ -139,10 +121,6 @@ class TestAllTypesProto2(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapSint32Sint32Entry: ... - class MapSint64Sint64Entry(Message): key: int value: int @@ -152,10 +130,6 @@ class TestAllTypesProto2(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapSint64Sint64Entry: ... - class MapFixed32Fixed32Entry(Message): key: int value: int @@ -165,10 +139,6 @@ class TestAllTypesProto2(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapFixed32Fixed32Entry: ... - class MapFixed64Fixed64Entry(Message): key: int value: int @@ -178,10 +148,6 @@ class TestAllTypesProto2(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapFixed64Fixed64Entry: ... - class MapSfixed32Sfixed32Entry(Message): key: int value: int @@ -191,10 +157,6 @@ class TestAllTypesProto2(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapSfixed32Sfixed32Entry: ... - class MapSfixed64Sfixed64Entry(Message): key: int value: int @@ -204,10 +166,6 @@ class TestAllTypesProto2(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapSfixed64Sfixed64Entry: ... - class MapInt32FloatEntry(Message): key: int value: float @@ -217,10 +175,6 @@ class TestAllTypesProto2(Message): value: Optional[float] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapInt32FloatEntry: ... - class MapInt32DoubleEntry(Message): key: int value: float @@ -230,10 +184,6 @@ class TestAllTypesProto2(Message): value: Optional[float] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapInt32DoubleEntry: ... - class MapBoolBoolEntry(Message): key: bool value: bool @@ -243,9 +193,6 @@ class TestAllTypesProto2(Message): value: Optional[bool] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto2.MapBoolBoolEntry: ... - class MapStringStringEntry(Message): key: Text value: Text @@ -255,10 +202,6 @@ class TestAllTypesProto2(Message): value: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapStringStringEntry: ... - class MapStringBytesEntry(Message): key: Text value: bytes @@ -268,10 +211,6 @@ class TestAllTypesProto2(Message): value: Optional[bytes] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapStringBytesEntry: ... - class MapStringNestedMessageEntry(Message): key: Text @@ -283,10 +222,6 @@ class TestAllTypesProto2(Message): value: Optional[TestAllTypesProto2.NestedMessage] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapStringNestedMessageEntry: ... - class MapStringForeignMessageEntry(Message): key: Text @@ -298,10 +233,6 @@ class TestAllTypesProto2(Message): value: Optional[ForeignMessageProto2] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapStringForeignMessageEntry: ... - class MapStringNestedEnumEntry(Message): key: Text value: TestAllTypesProto2.NestedEnum @@ -311,10 +242,6 @@ class TestAllTypesProto2(Message): value: Optional[TestAllTypesProto2.NestedEnum] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapStringNestedEnumEntry: ... - class MapStringForeignEnumEntry(Message): key: Text value: ForeignEnumProto2 @@ -324,10 +251,6 @@ class TestAllTypesProto2(Message): value: Optional[ForeignEnumProto2] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MapStringForeignEnumEntry: ... - class Data(Message): group_int32: int group_uint32: int @@ -337,18 +260,11 @@ class TestAllTypesProto2(Message): group_uint32: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto2.Data: ... - class MessageSetCorrect(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MessageSetCorrect: ... - class MessageSetCorrectExtension1(Message): bytes: Text @@ -356,10 +272,6 @@ class TestAllTypesProto2(Message): bytes: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: builtins.bytes) -> TestAllTypesProto2.MessageSetCorrectExtension1: ... - class MessageSetCorrectExtension2(Message): i: int @@ -367,74 +279,6 @@ class TestAllTypesProto2(Message): i: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestAllTypesProto2.MessageSetCorrectExtension2: ... - optional_int32: int - optional_int64: int - optional_uint32: int - optional_uint64: int - optional_sint32: int - optional_sint64: int - optional_fixed32: int - optional_fixed64: int - optional_sfixed32: int - optional_sfixed64: int - optional_float: float - optional_double: float - optional_bool: bool - optional_string: Text - optional_bytes: bytes - optional_nested_enum: TestAllTypesProto2.NestedEnum - optional_foreign_enum: ForeignEnumProto2 - optional_string_piece: Text - optional_cord: Text - repeated_int32: RepeatedScalarFieldContainer[int] - repeated_int64: RepeatedScalarFieldContainer[int] - repeated_uint32: RepeatedScalarFieldContainer[int] - repeated_uint64: RepeatedScalarFieldContainer[int] - repeated_sint32: RepeatedScalarFieldContainer[int] - repeated_sint64: RepeatedScalarFieldContainer[int] - repeated_fixed32: RepeatedScalarFieldContainer[int] - repeated_fixed64: RepeatedScalarFieldContainer[int] - repeated_sfixed32: RepeatedScalarFieldContainer[int] - repeated_sfixed64: RepeatedScalarFieldContainer[int] - repeated_float: RepeatedScalarFieldContainer[float] - repeated_double: RepeatedScalarFieldContainer[float] - repeated_bool: RepeatedScalarFieldContainer[bool] - repeated_string: RepeatedScalarFieldContainer[Text] - repeated_bytes: RepeatedScalarFieldContainer[bytes] - repeated_nested_enum: RepeatedScalarFieldContainer[TestAllTypesProto2.NestedEnum] - repeated_foreign_enum: RepeatedScalarFieldContainer[ForeignEnumProto2] - repeated_string_piece: RepeatedScalarFieldContainer[Text] - repeated_cord: RepeatedScalarFieldContainer[Text] - oneof_uint32: int - oneof_string: Text - oneof_bytes: bytes - oneof_bool: bool - oneof_uint64: int - oneof_float: float - oneof_double: float - oneof_enum: TestAllTypesProto2.NestedEnum - fieldname1: int - field_name2: int - _field_name3: int - field__name4_: int - field0name5: int - field_0_name6: int - fieldName7: int - FieldName8: int - field_Name9: int - Field_Name10: int - FIELD_NAME11: int - FIELD_name12: int - __field_name13: int - __Field_name14: int - field__name15: int - field__Name16: int - field_name17__: int - Field_name18__: int - @property def optional_nested_message(self) -> TestAllTypesProto2.NestedMessage: ... @@ -612,9 +456,6 @@ class TestAllTypesProto2(Message): Field_name18__: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto2: ... - class ForeignMessageProto2(Message): c: int @@ -622,6 +463,3 @@ class ForeignMessageProto2(Message): def __init__(self, c: Optional[int] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> ForeignMessageProto2: ... diff --git a/third_party/2and3/google/protobuf/test_messages_proto3_pb2.pyi b/third_party/2and3/google/protobuf/test_messages_proto3_pb2.pyi index 5a9cce340..bd23e3798 100644 --- a/third_party/2and3/google/protobuf/test_messages_proto3_pb2.pyi +++ b/third_party/2and3/google/protobuf/test_messages_proto3_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.any_pb2 import ( Any, ) @@ -99,9 +100,6 @@ class TestAllTypesProto3(Message): corecursive: Optional[TestAllTypesProto3] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.NestedMessage: ... - class MapInt32Int32Entry(Message): key: int value: int @@ -111,9 +109,6 @@ class TestAllTypesProto3(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapInt32Int32Entry: ... - class MapInt64Int64Entry(Message): key: int value: int @@ -123,9 +118,6 @@ class TestAllTypesProto3(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapInt64Int64Entry: ... - class MapUint32Uint32Entry(Message): key: int value: int @@ -135,9 +127,6 @@ class TestAllTypesProto3(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapUint32Uint32Entry: ... - class MapUint64Uint64Entry(Message): key: int value: int @@ -147,9 +136,6 @@ class TestAllTypesProto3(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapUint64Uint64Entry: ... - class MapSint32Sint32Entry(Message): key: int value: int @@ -159,9 +145,6 @@ class TestAllTypesProto3(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapSint32Sint32Entry: ... - class MapSint64Sint64Entry(Message): key: int value: int @@ -171,9 +154,6 @@ class TestAllTypesProto3(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapSint64Sint64Entry: ... - class MapFixed32Fixed32Entry(Message): key: int value: int @@ -183,9 +163,6 @@ class TestAllTypesProto3(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapFixed32Fixed32Entry: ... - class MapFixed64Fixed64Entry(Message): key: int value: int @@ -195,9 +172,6 @@ class TestAllTypesProto3(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapFixed64Fixed64Entry: ... - class MapSfixed32Sfixed32Entry(Message): key: int value: int @@ -207,9 +181,6 @@ class TestAllTypesProto3(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapSfixed32Sfixed32Entry: ... - class MapSfixed64Sfixed64Entry(Message): key: int value: int @@ -219,9 +190,6 @@ class TestAllTypesProto3(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapSfixed64Sfixed64Entry: ... - class MapInt32FloatEntry(Message): key: int value: float @@ -231,9 +199,6 @@ class TestAllTypesProto3(Message): value: Optional[float] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapInt32FloatEntry: ... - class MapInt32DoubleEntry(Message): key: int value: float @@ -243,9 +208,6 @@ class TestAllTypesProto3(Message): value: Optional[float] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapInt32DoubleEntry: ... - class MapBoolBoolEntry(Message): key: bool value: bool @@ -255,9 +217,6 @@ class TestAllTypesProto3(Message): value: Optional[bool] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapBoolBoolEntry: ... - class MapStringStringEntry(Message): key: Text value: Text @@ -267,9 +226,6 @@ class TestAllTypesProto3(Message): value: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapStringStringEntry: ... - class MapStringBytesEntry(Message): key: Text value: bytes @@ -279,9 +235,6 @@ class TestAllTypesProto3(Message): value: Optional[bytes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapStringBytesEntry: ... - class MapStringNestedMessageEntry(Message): key: Text @@ -293,9 +246,6 @@ class TestAllTypesProto3(Message): value: Optional[TestAllTypesProto3.NestedMessage] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapStringNestedMessageEntry: ... - class MapStringForeignMessageEntry(Message): key: Text @@ -307,9 +257,6 @@ class TestAllTypesProto3(Message): value: Optional[ForeignMessage] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapStringForeignMessageEntry: ... - class MapStringNestedEnumEntry(Message): key: Text value: TestAllTypesProto3.NestedEnum @@ -319,9 +266,6 @@ class TestAllTypesProto3(Message): value: Optional[TestAllTypesProto3.NestedEnum] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapStringNestedEnumEntry: ... - class MapStringForeignEnumEntry(Message): key: Text value: ForeignEnum @@ -331,73 +275,6 @@ class TestAllTypesProto3(Message): value: Optional[ForeignEnum] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3.MapStringForeignEnumEntry: ... - optional_int32: int - optional_int64: int - optional_uint32: int - optional_uint64: int - optional_sint32: int - optional_sint64: int - optional_fixed32: int - optional_fixed64: int - optional_sfixed32: int - optional_sfixed64: int - optional_float: float - optional_double: float - optional_bool: bool - optional_string: Text - optional_bytes: bytes - optional_nested_enum: TestAllTypesProto3.NestedEnum - optional_foreign_enum: ForeignEnum - optional_string_piece: Text - optional_cord: Text - repeated_int32: RepeatedScalarFieldContainer[int] - repeated_int64: RepeatedScalarFieldContainer[int] - repeated_uint32: RepeatedScalarFieldContainer[int] - repeated_uint64: RepeatedScalarFieldContainer[int] - repeated_sint32: RepeatedScalarFieldContainer[int] - repeated_sint64: RepeatedScalarFieldContainer[int] - repeated_fixed32: RepeatedScalarFieldContainer[int] - repeated_fixed64: RepeatedScalarFieldContainer[int] - repeated_sfixed32: RepeatedScalarFieldContainer[int] - repeated_sfixed64: RepeatedScalarFieldContainer[int] - repeated_float: RepeatedScalarFieldContainer[float] - repeated_double: RepeatedScalarFieldContainer[float] - repeated_bool: RepeatedScalarFieldContainer[bool] - repeated_string: RepeatedScalarFieldContainer[Text] - repeated_bytes: RepeatedScalarFieldContainer[bytes] - repeated_nested_enum: RepeatedScalarFieldContainer[TestAllTypesProto3.NestedEnum] - repeated_foreign_enum: RepeatedScalarFieldContainer[ForeignEnum] - repeated_string_piece: RepeatedScalarFieldContainer[Text] - repeated_cord: RepeatedScalarFieldContainer[Text] - oneof_uint32: int - oneof_string: Text - oneof_bytes: bytes - oneof_bool: bool - oneof_uint64: int - oneof_float: float - oneof_double: float - oneof_enum: TestAllTypesProto3.NestedEnum - fieldname1: int - field_name2: int - _field_name3: int - field__name4_: int - field0name5: int - field_0_name6: int - fieldName7: int - FieldName8: int - field_Name9: int - Field_Name10: int - FIELD_NAME11: int - FIELD_name12: int - __field_name13: int - __Field_name14: int - field__name15: int - field__Name16: int - field_name17__: int - Field_name18__: int - @property def optional_nested_message(self) -> TestAllTypesProto3.NestedMessage: ... @@ -685,9 +562,6 @@ class TestAllTypesProto3(Message): Field_name18__: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypesProto3: ... - class ForeignMessage(Message): c: int @@ -695,6 +569,3 @@ class ForeignMessage(Message): def __init__(self, c: Optional[int] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> ForeignMessage: ... diff --git a/third_party/2and3/google/protobuf/timestamp_pb2.pyi b/third_party/2and3/google/protobuf/timestamp_pb2.pyi index 77ae3055c..308b17aef 100644 --- a/third_party/2and3/google/protobuf/timestamp_pb2.pyi +++ b/third_party/2and3/google/protobuf/timestamp_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -16,6 +17,3 @@ class Timestamp(Message, well_known_types.Timestamp): seconds: Optional[int] = ..., nanos: Optional[int] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> Timestamp: ... diff --git a/third_party/2and3/google/protobuf/type_pb2.pyi b/third_party/2and3/google/protobuf/type_pb2.pyi index e3ff9b101..ad63ce0f8 100644 --- a/third_party/2and3/google/protobuf/type_pb2.pyi +++ b/third_party/2and3/google/protobuf/type_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.any_pb2 import ( Any, ) @@ -66,9 +67,6 @@ class Type(Message): syntax: Optional[Syntax] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Type: ... - class Field(Message): @@ -154,9 +152,6 @@ class Field(Message): default_value: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Field: ... - class Enum(Message): name: Text @@ -179,9 +174,6 @@ class Enum(Message): syntax: Optional[Syntax] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Enum: ... - class EnumValue(Message): name: Text @@ -196,9 +188,6 @@ class EnumValue(Message): options: Optional[Iterable[Option]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> EnumValue: ... - class Option(Message): name: Text @@ -210,6 +199,3 @@ class Option(Message): name: Optional[Text] = ..., value: Optional[Any] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> Option: ... diff --git a/third_party/2and3/google/protobuf/unittest_arena_pb2.pyi b/third_party/2and3/google/protobuf/unittest_arena_pb2.pyi index 89d6042be..7940f644d 100644 --- a/third_party/2and3/google/protobuf/unittest_arena_pb2.pyi +++ b/third_party/2and3/google/protobuf/unittest_arena_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.internal.containers import ( RepeatedCompositeFieldContainer, ) @@ -20,9 +21,6 @@ class NestedMessage(Message): d: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> NestedMessage: ... - class ArenaMessage(Message): @@ -38,6 +36,3 @@ class ArenaMessage(Message): repeated_nested_message: Optional[Iterable[NestedMessage]] = ..., repeated_import_no_arena_message: Optional[Iterable[ImportNoArenaNestedMessage]] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> ArenaMessage: ... diff --git a/third_party/2and3/google/protobuf/unittest_custom_options_pb2.pyi b/third_party/2and3/google/protobuf/unittest_custom_options_pb2.pyi index 5028e079e..245cb1819 100644 --- a/third_party/2and3/google/protobuf/unittest_custom_options_pb2.pyi +++ b/third_party/2and3/google/protobuf/unittest_custom_options_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.descriptor_pb2 import ( FileOptions, ) @@ -90,45 +91,30 @@ class TestMessageWithCustomOptions(Message): oneof_field: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMessageWithCustomOptions: ... - class CustomOptionFooRequest(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> CustomOptionFooRequest: ... - class CustomOptionFooResponse(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> CustomOptionFooResponse: ... - class CustomOptionFooClientMessage(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> CustomOptionFooClientMessage: ... - class CustomOptionFooServerMessage(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> CustomOptionFooServerMessage: ... - class DummyMessageContainingEnum(Message): @@ -155,63 +141,42 @@ class DummyMessageContainingEnum(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> DummyMessageContainingEnum: ... - class DummyMessageInvalidAsOptionType(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> DummyMessageInvalidAsOptionType: ... - class CustomOptionMinIntegerValues(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> CustomOptionMinIntegerValues: ... - class CustomOptionMaxIntegerValues(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> CustomOptionMaxIntegerValues: ... - class CustomOptionOtherValues(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> CustomOptionOtherValues: ... - class SettingRealsFromPositiveInts(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> SettingRealsFromPositiveInts: ... - class SettingRealsFromNegativeInts(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> SettingRealsFromNegativeInts: ... - class ComplexOptionType1(Message): foo: int @@ -226,9 +191,6 @@ class ComplexOptionType1(Message): foo4: Optional[Iterable[int]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> ComplexOptionType1: ... - class ComplexOptionType2(Message): @@ -239,11 +201,6 @@ class ComplexOptionType2(Message): waldo: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> ComplexOptionType2.ComplexOptionType4: ... - baz: int - @property def bar(self) -> ComplexOptionType1: ... @@ -261,9 +218,6 @@ class ComplexOptionType2(Message): barney: Optional[Iterable[ComplexOptionType2.ComplexOptionType4]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> ComplexOptionType2: ... - class ComplexOptionType3(Message): @@ -274,11 +228,6 @@ class ComplexOptionType3(Message): plugh: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> ComplexOptionType3.ComplexOptionType5: ... - qux: int - @property def complexoptiontype5(self) -> ComplexOptionType3.ComplexOptionType5: ... @@ -287,9 +236,6 @@ class ComplexOptionType3(Message): complexoptiontype5: Optional[ComplexOptionType3.ComplexOptionType5] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> ComplexOptionType3: ... - class ComplexOpt6(Message): xyzzy: int @@ -298,27 +244,18 @@ class ComplexOpt6(Message): xyzzy: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> ComplexOpt6: ... - class VariousComplexOptions(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> VariousComplexOptions: ... - class AggregateMessageSet(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> AggregateMessageSet: ... - class AggregateMessageSetElement(Message): s: Text @@ -327,9 +264,6 @@ class AggregateMessageSetElement(Message): s: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> AggregateMessageSetElement: ... - class Aggregate(Message): i: int @@ -352,9 +286,6 @@ class Aggregate(Message): mset: Optional[AggregateMessageSet] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Aggregate: ... - class AggregateMessage(Message): fieldname: int @@ -363,9 +294,6 @@ class AggregateMessage(Message): fieldname: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> AggregateMessage: ... - class NestedOptionType(Message): @@ -394,15 +322,9 @@ class NestedOptionType(Message): nested_field: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> NestedOptionType.NestedMessage: ... - def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> NestedOptionType: ... - class OldOptionType(Message): @@ -429,9 +351,6 @@ class OldOptionType(Message): value: OldOptionType.TestEnum, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> OldOptionType: ... - class NewOptionType(Message): @@ -459,14 +378,8 @@ class NewOptionType(Message): value: NewOptionType.TestEnum, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> NewOptionType: ... - class TestMessageWithRequiredEnumOption(Message): def __init__(self, ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> TestMessageWithRequiredEnumOption: ... diff --git a/third_party/2and3/google/protobuf/unittest_import_pb2.pyi b/third_party/2and3/google/protobuf/unittest_import_pb2.pyi index 92f191473..a42387ae1 100644 --- a/third_party/2and3/google/protobuf/unittest_import_pb2.pyi +++ b/third_party/2and3/google/protobuf/unittest_import_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -61,6 +62,3 @@ class ImportMessage(Message): def __init__(self, d: Optional[int] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> ImportMessage: ... diff --git a/third_party/2and3/google/protobuf/unittest_import_public_pb2.pyi b/third_party/2and3/google/protobuf/unittest_import_public_pb2.pyi index c8e13ff01..2207c1104 100644 --- a/third_party/2and3/google/protobuf/unittest_import_public_pb2.pyi +++ b/third_party/2and3/google/protobuf/unittest_import_public_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -12,6 +13,3 @@ class PublicImportMessage(Message): def __init__(self, e: Optional[int] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> PublicImportMessage: ... diff --git a/third_party/2and3/google/protobuf/unittest_mset_pb2.pyi b/third_party/2and3/google/protobuf/unittest_mset_pb2.pyi index 63663207b..f30569d69 100644 --- a/third_party/2and3/google/protobuf/unittest_mset_pb2.pyi +++ b/third_party/2and3/google/protobuf/unittest_mset_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.internal.containers import ( RepeatedCompositeFieldContainer, ) @@ -24,9 +25,6 @@ class TestMessageSetContainer(Message): message_set: Optional[TestMessageSet] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMessageSetContainer: ... - class TestMessageSetExtension1(Message): i: int @@ -35,9 +33,6 @@ class TestMessageSetExtension1(Message): i: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMessageSetExtension1: ... - class TestMessageSetExtension2(Message): str: Text @@ -46,9 +41,6 @@ class TestMessageSetExtension2(Message): bytes: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: builtins.bytes) -> TestMessageSetExtension2: ... - class RawMessageSet(Message): @@ -61,15 +53,9 @@ class RawMessageSet(Message): message: bytes, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> RawMessageSet.Item: ... - @property def item(self) -> RepeatedCompositeFieldContainer[RawMessageSet.Item]: ... def __init__(self, item: Optional[Iterable[RawMessageSet.Item]] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> RawMessageSet: ... diff --git a/third_party/2and3/google/protobuf/unittest_mset_wire_format_pb2.pyi b/third_party/2and3/google/protobuf/unittest_mset_wire_format_pb2.pyi index acb24a46f..2855d035e 100644 --- a/third_party/2and3/google/protobuf/unittest_mset_wire_format_pb2.pyi +++ b/third_party/2and3/google/protobuf/unittest_mset_wire_format_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -11,9 +12,6 @@ class TestMessageSet(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMessageSet: ... - class TestMessageSetWireFormatContainer(Message): @@ -23,6 +21,3 @@ class TestMessageSetWireFormatContainer(Message): def __init__(self, message_set: Optional[TestMessageSet] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> TestMessageSetWireFormatContainer: ... diff --git a/third_party/2and3/google/protobuf/unittest_no_arena_import_pb2.pyi b/third_party/2and3/google/protobuf/unittest_no_arena_import_pb2.pyi index c02e4d3c7..7bca5da70 100644 --- a/third_party/2and3/google/protobuf/unittest_no_arena_import_pb2.pyi +++ b/third_party/2and3/google/protobuf/unittest_no_arena_import_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -12,6 +13,3 @@ class ImportNoArenaNestedMessage(Message): def __init__(self, d: Optional[int] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> ImportNoArenaNestedMessage: ... diff --git a/third_party/2and3/google/protobuf/unittest_no_arena_pb2.pyi b/third_party/2and3/google/protobuf/unittest_no_arena_pb2.pyi index 8a256222b..8185f2cfc 100644 --- a/third_party/2and3/google/protobuf/unittest_no_arena_pb2.pyi +++ b/third_party/2and3/google/protobuf/unittest_no_arena_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.internal.containers import ( RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer, @@ -78,9 +79,6 @@ class TestAllTypes(Message): bb: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypes.NestedMessage: ... - class OptionalGroup(Message): a: int @@ -88,9 +86,6 @@ class TestAllTypes(Message): a: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypes.OptionalGroup: ... - class RepeatedGroup(Message): a: int @@ -98,72 +93,6 @@ class TestAllTypes(Message): a: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypes.RepeatedGroup: ... - optional_int32: int - optional_int64: int - optional_uint32: int - optional_uint64: int - optional_sint32: int - optional_sint64: int - optional_fixed32: int - optional_fixed64: int - optional_sfixed32: int - optional_sfixed64: int - optional_float: float - optional_double: float - optional_bool: bool - optional_string: Text - optional_bytes: bytes - optional_nested_enum: TestAllTypes.NestedEnum - optional_foreign_enum: ForeignEnum - optional_import_enum: ImportEnum - optional_string_piece: Text - optional_cord: Text - repeated_int32: RepeatedScalarFieldContainer[int] - repeated_int64: RepeatedScalarFieldContainer[int] - repeated_uint32: RepeatedScalarFieldContainer[int] - repeated_uint64: RepeatedScalarFieldContainer[int] - repeated_sint32: RepeatedScalarFieldContainer[int] - repeated_sint64: RepeatedScalarFieldContainer[int] - repeated_fixed32: RepeatedScalarFieldContainer[int] - repeated_fixed64: RepeatedScalarFieldContainer[int] - repeated_sfixed32: RepeatedScalarFieldContainer[int] - repeated_sfixed64: RepeatedScalarFieldContainer[int] - repeated_float: RepeatedScalarFieldContainer[float] - repeated_double: RepeatedScalarFieldContainer[float] - repeated_bool: RepeatedScalarFieldContainer[bool] - repeated_string: RepeatedScalarFieldContainer[Text] - repeated_bytes: RepeatedScalarFieldContainer[bytes] - repeated_nested_enum: RepeatedScalarFieldContainer[TestAllTypes.NestedEnum] - repeated_foreign_enum: RepeatedScalarFieldContainer[ForeignEnum] - repeated_import_enum: RepeatedScalarFieldContainer[ImportEnum] - repeated_string_piece: RepeatedScalarFieldContainer[Text] - repeated_cord: RepeatedScalarFieldContainer[Text] - default_int32: int - default_int64: int - default_uint32: int - default_uint64: int - default_sint32: int - default_sint64: int - default_fixed32: int - default_fixed64: int - default_sfixed32: int - default_sfixed64: int - default_float: float - default_double: float - default_bool: bool - default_string: Text - default_bytes: bytes - default_nested_enum: TestAllTypes.NestedEnum - default_foreign_enum: ForeignEnum - default_import_enum: ImportEnum - default_string_piece: Text - default_cord: Text - oneof_uint32: int - oneof_string: Text - oneof_bytes: bytes - @property def optionalgroup(self) -> TestAllTypes.OptionalGroup: ... @@ -287,9 +216,6 @@ class TestAllTypes(Message): lazy_oneof_nested_message: Optional[TestAllTypes.NestedMessage] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypes: ... - class ForeignMessage(Message): c: int @@ -298,9 +224,6 @@ class ForeignMessage(Message): c: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> ForeignMessage: ... - class TestNoArenaMessage(Message): @@ -310,6 +233,3 @@ class TestNoArenaMessage(Message): def __init__(self, arena_message: Optional[ArenaMessage] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> TestNoArenaMessage: ... diff --git a/third_party/2and3/google/protobuf/unittest_no_generic_services_pb2.pyi b/third_party/2and3/google/protobuf/unittest_no_generic_services_pb2.pyi index b65863b1f..a791742c0 100644 --- a/third_party/2and3/google/protobuf/unittest_no_generic_services_pb2.pyi +++ b/third_party/2and3/google/protobuf/unittest_no_generic_services_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -35,6 +36,3 @@ class TestMessage(Message): def __init__(self, a: Optional[int] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> TestMessage: ... diff --git a/third_party/2and3/google/protobuf/unittest_pb2.pyi b/third_party/2and3/google/protobuf/unittest_pb2.pyi index 7f052577d..5ff590577 100644 --- a/third_party/2and3/google/protobuf/unittest_pb2.pyi +++ b/third_party/2and3/google/protobuf/unittest_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.internal.containers import ( RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer, @@ -124,9 +125,6 @@ class TestAllTypes(Message): bb: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypes.NestedMessage: ... - class OptionalGroup(Message): a: int @@ -134,9 +132,6 @@ class TestAllTypes(Message): a: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypes.OptionalGroup: ... - class RepeatedGroup(Message): a: int @@ -144,72 +139,6 @@ class TestAllTypes(Message): a: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypes.RepeatedGroup: ... - optional_int32: int - optional_int64: int - optional_uint32: int - optional_uint64: int - optional_sint32: int - optional_sint64: int - optional_fixed32: int - optional_fixed64: int - optional_sfixed32: int - optional_sfixed64: int - optional_float: float - optional_double: float - optional_bool: bool - optional_string: Text - optional_bytes: bytes - optional_nested_enum: TestAllTypes.NestedEnum - optional_foreign_enum: ForeignEnum - optional_import_enum: ImportEnum - optional_string_piece: Text - optional_cord: Text - repeated_int32: RepeatedScalarFieldContainer[int] - repeated_int64: RepeatedScalarFieldContainer[int] - repeated_uint32: RepeatedScalarFieldContainer[int] - repeated_uint64: RepeatedScalarFieldContainer[int] - repeated_sint32: RepeatedScalarFieldContainer[int] - repeated_sint64: RepeatedScalarFieldContainer[int] - repeated_fixed32: RepeatedScalarFieldContainer[int] - repeated_fixed64: RepeatedScalarFieldContainer[int] - repeated_sfixed32: RepeatedScalarFieldContainer[int] - repeated_sfixed64: RepeatedScalarFieldContainer[int] - repeated_float: RepeatedScalarFieldContainer[float] - repeated_double: RepeatedScalarFieldContainer[float] - repeated_bool: RepeatedScalarFieldContainer[bool] - repeated_string: RepeatedScalarFieldContainer[Text] - repeated_bytes: RepeatedScalarFieldContainer[bytes] - repeated_nested_enum: RepeatedScalarFieldContainer[TestAllTypes.NestedEnum] - repeated_foreign_enum: RepeatedScalarFieldContainer[ForeignEnum] - repeated_import_enum: RepeatedScalarFieldContainer[ImportEnum] - repeated_string_piece: RepeatedScalarFieldContainer[Text] - repeated_cord: RepeatedScalarFieldContainer[Text] - default_int32: int - default_int64: int - default_uint32: int - default_uint64: int - default_sint32: int - default_sint64: int - default_fixed32: int - default_fixed64: int - default_sfixed32: int - default_sfixed64: int - default_float: float - default_double: float - default_bool: bool - default_string: Text - default_bytes: bytes - default_nested_enum: TestAllTypes.NestedEnum - default_foreign_enum: ForeignEnum - default_import_enum: ImportEnum - default_string_piece: Text - default_cord: Text - oneof_uint32: int - oneof_string: Text - oneof_bytes: bytes - @property def optionalgroup(self) -> TestAllTypes.OptionalGroup: ... @@ -329,9 +258,6 @@ class TestAllTypes(Message): oneof_bytes: Optional[bytes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypes: ... - class NestedTestAllTypes(Message): @@ -351,9 +277,6 @@ class NestedTestAllTypes(Message): repeated_child: Optional[Iterable[NestedTestAllTypes]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> NestedTestAllTypes: ... - class TestDeprecatedFields(Message): deprecated_int32: int @@ -364,18 +287,12 @@ class TestDeprecatedFields(Message): deprecated_int32_in_oneof: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestDeprecatedFields: ... - class TestDeprecatedMessage(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestDeprecatedMessage: ... - class ForeignMessage(Message): c: int @@ -386,27 +303,18 @@ class ForeignMessage(Message): d: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> ForeignMessage: ... - class TestReservedFields(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestReservedFields: ... - class TestAllExtensions(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllExtensions: ... - class OptionalGroup_extension(Message): a: int @@ -415,9 +323,6 @@ class OptionalGroup_extension(Message): a: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> OptionalGroup_extension: ... - class RepeatedGroup_extension(Message): a: int @@ -426,9 +331,6 @@ class RepeatedGroup_extension(Message): a: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> RepeatedGroup_extension: ... - class TestGroup(Message): class OptionalGroup(Message): @@ -438,10 +340,6 @@ class TestGroup(Message): a: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestGroup.OptionalGroup: ... - optional_foreign_enum: ForeignEnum - @property def optionalgroup(self) -> TestGroup.OptionalGroup: ... @@ -450,18 +348,12 @@ class TestGroup(Message): optional_foreign_enum: Optional[ForeignEnum] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestGroup: ... - class TestGroupExtension(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestGroupExtension: ... - class TestNestedExtension(Message): class OptionalGroup_extension(Message): @@ -471,16 +363,9 @@ class TestNestedExtension(Message): a: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestNestedExtension.OptionalGroup_extension: ... - def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestNestedExtension: ... - class TestRequired(Message): a: int @@ -553,9 +438,6 @@ class TestRequired(Message): dummy32: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestRequired: ... - class TestRequiredForeign(Message): dummy: int @@ -573,9 +455,6 @@ class TestRequiredForeign(Message): dummy: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestRequiredForeign: ... - class TestRequiredMessage(Message): @@ -595,9 +474,6 @@ class TestRequiredMessage(Message): repeated_message: Optional[Iterable[TestRequired]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestRequiredMessage: ... - class TestForeignNested(Message): @@ -608,36 +484,24 @@ class TestForeignNested(Message): foreign_nested: Optional[TestAllTypes.NestedMessage] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestForeignNested: ... - class TestEmptyMessage(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestEmptyMessage: ... - class TestEmptyMessageWithExtensions(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestEmptyMessageWithExtensions: ... - class TestMultipleExtensionRanges(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMultipleExtensionRanges: ... - class TestReallyLargeTagNumber(Message): a: int @@ -648,9 +512,6 @@ class TestReallyLargeTagNumber(Message): bb: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestReallyLargeTagNumber: ... - class TestRecursiveMessage(Message): i: int @@ -663,9 +524,6 @@ class TestRecursiveMessage(Message): i: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestRecursiveMessage: ... - class TestMutualRecursionA(Message): class SubMessage(Message): @@ -677,9 +535,6 @@ class TestMutualRecursionA(Message): b: Optional[TestMutualRecursionB] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMutualRecursionA.SubMessage: ... - class SubGroup(Message): @property @@ -693,9 +548,6 @@ class TestMutualRecursionA(Message): not_in_this_scc: Optional[TestAllTypes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMutualRecursionA.SubGroup: ... - @property def bb(self) -> TestMutualRecursionB: ... @@ -707,9 +559,6 @@ class TestMutualRecursionA(Message): subgroup: Optional[TestMutualRecursionA.SubGroup] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMutualRecursionA: ... - class TestMutualRecursionB(Message): optional_int32: int @@ -722,9 +571,6 @@ class TestMutualRecursionB(Message): optional_int32: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMutualRecursionB: ... - class TestIsInitialized(Message): class SubMessage(Message): @@ -735,10 +581,6 @@ class TestIsInitialized(Message): i: int, ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestIsInitialized.SubMessage.SubGroup: ... - @property def subgroup(self) -> TestIsInitialized.SubMessage.SubGroup: ... @@ -746,9 +588,6 @@ class TestIsInitialized(Message): subgroup: Optional[TestIsInitialized.SubMessage.SubGroup] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestIsInitialized.SubMessage: ... - @property def sub_message(self) -> TestIsInitialized.SubMessage: ... @@ -756,9 +595,6 @@ class TestIsInitialized(Message): sub_message: Optional[TestIsInitialized.SubMessage] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestIsInitialized: ... - class TestDupFieldNumber(Message): class Foo(Message): @@ -768,9 +604,6 @@ class TestDupFieldNumber(Message): a: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestDupFieldNumber.Foo: ... - class Bar(Message): a: int @@ -778,10 +611,6 @@ class TestDupFieldNumber(Message): a: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestDupFieldNumber.Bar: ... - a: int - @property def foo(self) -> TestDupFieldNumber.Foo: ... @@ -794,9 +623,6 @@ class TestDupFieldNumber(Message): bar: Optional[TestDupFieldNumber.Bar] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestDupFieldNumber: ... - class TestEagerMessage(Message): @@ -807,9 +633,6 @@ class TestEagerMessage(Message): sub_message: Optional[TestAllTypes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestEagerMessage: ... - class TestLazyMessage(Message): @@ -820,9 +643,6 @@ class TestLazyMessage(Message): sub_message: Optional[TestAllTypes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestLazyMessage: ... - class TestNestedMessageHasBits(Message): class NestedMessage(Message): @@ -837,10 +657,6 @@ class TestNestedMessageHasBits(Message): nestedmessage_repeated_foreignmessage: Optional[Iterable[ForeignMessage]] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestNestedMessageHasBits.NestedMessage: ... - @property def optional_nested_message( self) -> TestNestedMessageHasBits.NestedMessage: ... @@ -849,9 +665,6 @@ class TestNestedMessageHasBits(Message): optional_nested_message: Optional[TestNestedMessageHasBits.NestedMessage] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestNestedMessageHasBits: ... - class TestCamelCaseFieldNames(Message): PrimitiveField: int @@ -887,9 +700,6 @@ class TestCamelCaseFieldNames(Message): RepeatedCordField: Optional[Iterable[Text]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestCamelCaseFieldNames: ... - class TestFieldOrderings(Message): class NestedMessage(Message): @@ -901,12 +711,6 @@ class TestFieldOrderings(Message): bb: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestFieldOrderings.NestedMessage: ... - my_string: Text - my_int: int - my_float: float - @property def optional_nested_message(self) -> TestFieldOrderings.NestedMessage: ... @@ -917,9 +721,6 @@ class TestFieldOrderings(Message): optional_nested_message: Optional[TestFieldOrderings.NestedMessage] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestFieldOrderings: ... - class TestExtensionOrderings1(Message): my_string: Text @@ -928,9 +729,6 @@ class TestExtensionOrderings1(Message): my_string: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestExtensionOrderings1: ... - class TestExtensionOrderings2(Message): class TestExtensionOrderings3(Message): @@ -940,18 +738,10 @@ class TestExtensionOrderings2(Message): my_string: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestExtensionOrderings2.TestExtensionOrderings3: ... - my_string: Text - def __init__(self, my_string: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestExtensionOrderings2: ... - class TestExtremeDefaultValues(Message): escaped_bytes: bytes @@ -1012,9 +802,6 @@ class TestExtremeDefaultValues(Message): replacement_string: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestExtremeDefaultValues: ... - class SparseEnumMessage(Message): sparse_enum: TestSparseEnum @@ -1023,9 +810,6 @@ class SparseEnumMessage(Message): sparse_enum: Optional[TestSparseEnum] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> SparseEnumMessage: ... - class OneString(Message): data: Text @@ -1034,9 +818,6 @@ class OneString(Message): data: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> OneString: ... - class MoreString(Message): data: RepeatedScalarFieldContainer[Text] @@ -1045,9 +826,6 @@ class MoreString(Message): data: Optional[Iterable[Text]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> MoreString: ... - class OneBytes(Message): data: bytes @@ -1056,9 +834,6 @@ class OneBytes(Message): data: Optional[bytes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> OneBytes: ... - class MoreBytes(Message): data: RepeatedScalarFieldContainer[bytes] @@ -1067,9 +842,6 @@ class MoreBytes(Message): data: Optional[Iterable[bytes]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> MoreBytes: ... - class Int32Message(Message): data: int @@ -1078,9 +850,6 @@ class Int32Message(Message): data: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Int32Message: ... - class Uint32Message(Message): data: int @@ -1089,9 +858,6 @@ class Uint32Message(Message): data: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Uint32Message: ... - class Int64Message(Message): data: int @@ -1100,9 +866,6 @@ class Int64Message(Message): data: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Int64Message: ... - class Uint64Message(Message): data: int @@ -1111,9 +874,6 @@ class Uint64Message(Message): data: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Uint64Message: ... - class BoolMessage(Message): data: bool @@ -1122,9 +882,6 @@ class BoolMessage(Message): data: Optional[bool] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> BoolMessage: ... - class TestOneof(Message): class FooGroup(Message): @@ -1136,11 +893,6 @@ class TestOneof(Message): b: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestOneof.FooGroup: ... - foo_int: int - foo_string: Text - @property def foo_message(self) -> TestAllTypes: ... @@ -1154,9 +906,6 @@ class TestOneof(Message): foogroup: Optional[TestOneof.FooGroup] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestOneof: ... - class TestOneofBackwardsCompatible(Message): class FooGroup(Message): @@ -1168,12 +917,6 @@ class TestOneofBackwardsCompatible(Message): b: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestOneofBackwardsCompatible.FooGroup: ... - foo_int: int - foo_string: Text - @property def foo_message(self) -> TestAllTypes: ... @@ -1187,9 +930,6 @@ class TestOneofBackwardsCompatible(Message): foogroup: Optional[TestOneofBackwardsCompatible.FooGroup] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestOneofBackwardsCompatible: ... - class TestOneof2(Message): class NestedEnum(int): @@ -1220,9 +960,6 @@ class TestOneof2(Message): b: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestOneof2.FooGroup: ... - class NestedMessage(Message): qux_int: int corge_int: RepeatedScalarFieldContainer[int] @@ -1232,23 +969,6 @@ class TestOneof2(Message): corge_int: Optional[Iterable[int]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestOneof2.NestedMessage: ... - foo_int: int - foo_string: Text - foo_cord: Text - foo_string_piece: Text - foo_bytes: bytes - foo_enum: TestOneof2.NestedEnum - bar_int: int - bar_string: Text - bar_cord: Text - bar_string_piece: Text - bar_bytes: bytes - bar_enum: TestOneof2.NestedEnum - baz_int: int - baz_string: Text - @property def foo_message(self) -> TestOneof2.NestedMessage: ... @@ -1278,9 +998,6 @@ class TestOneof2(Message): baz_string: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestOneof2: ... - class TestRequiredOneof(Message): class NestedMessage(Message): @@ -1290,11 +1007,6 @@ class TestRequiredOneof(Message): required_double: float, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestRequiredOneof.NestedMessage: ... - foo_int: int - foo_string: Text - @property def foo_message(self) -> TestRequiredOneof.NestedMessage: ... @@ -1304,9 +1016,6 @@ class TestRequiredOneof(Message): foo_message: Optional[TestRequiredOneof.NestedMessage] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestRequiredOneof: ... - class TestPackedTypes(Message): packed_int32: RepeatedScalarFieldContainer[int] @@ -1341,9 +1050,6 @@ class TestPackedTypes(Message): packed_enum: Optional[Iterable[ForeignEnum]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestPackedTypes: ... - class TestUnpackedTypes(Message): unpacked_int32: RepeatedScalarFieldContainer[int] @@ -1378,27 +1084,18 @@ class TestUnpackedTypes(Message): unpacked_enum: Optional[Iterable[ForeignEnum]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestUnpackedTypes: ... - class TestPackedExtensions(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestPackedExtensions: ... - class TestUnpackedExtensions(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestUnpackedExtensions: ... - class TestDynamicExtensions(Message): class DynamicEnumType(int): @@ -1428,15 +1125,6 @@ class TestDynamicExtensions(Message): dynamic_field: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestDynamicExtensions.DynamicMessageType: ... - scalar_extension: int - enum_extension: ForeignEnum - dynamic_enum_extension: TestDynamicExtensions.DynamicEnumType - repeated_extension: RepeatedScalarFieldContainer[Text] - packed_extension: RepeatedScalarFieldContainer[int] - @property def message_extension(self) -> ForeignMessage: ... @@ -1454,9 +1142,6 @@ class TestDynamicExtensions(Message): packed_extension: Optional[Iterable[int]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestDynamicExtensions: ... - class TestRepeatedScalarDifferentTagSizes(Message): repeated_fixed32: RepeatedScalarFieldContainer[int] @@ -1475,9 +1160,6 @@ class TestRepeatedScalarDifferentTagSizes(Message): repeated_uint64: Optional[Iterable[int]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestRepeatedScalarDifferentTagSizes: ... - class TestParsingMerge(Message): class RepeatedFieldsGenerator(Message): @@ -1490,10 +1172,6 @@ class TestParsingMerge(Message): field1: Optional[TestAllTypes] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestParsingMerge.RepeatedFieldsGenerator.Group1: ... - class Group2(Message): @property @@ -1503,10 +1181,6 @@ class TestParsingMerge(Message): field1: Optional[TestAllTypes] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestParsingMerge.RepeatedFieldsGenerator.Group2: ... - @property def field1(self) -> RepeatedCompositeFieldContainer[TestAllTypes]: ... @@ -1540,10 +1214,6 @@ class TestParsingMerge(Message): ext2: Optional[Iterable[TestAllTypes]] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestParsingMerge.RepeatedFieldsGenerator: ... - class OptionalGroup(Message): @property @@ -1553,9 +1223,6 @@ class TestParsingMerge(Message): optional_group_all_types: Optional[TestAllTypes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestParsingMerge.OptionalGroup: ... - class RepeatedGroup(Message): @property @@ -1565,9 +1232,6 @@ class TestParsingMerge(Message): repeated_group_all_types: Optional[TestAllTypes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestParsingMerge.RepeatedGroup: ... - @property def required_all_types(self) -> TestAllTypes: ... @@ -1593,9 +1257,6 @@ class TestParsingMerge(Message): repeatedgroup: Optional[Iterable[TestParsingMerge.RepeatedGroup]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestParsingMerge: ... - class TestCommentInjectionMessage(Message): a: Text @@ -1604,63 +1265,42 @@ class TestCommentInjectionMessage(Message): a: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestCommentInjectionMessage: ... - class FooRequest(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> FooRequest: ... - class FooResponse(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> FooResponse: ... - class FooClientMessage(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> FooClientMessage: ... - class FooServerMessage(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> FooServerMessage: ... - class BarRequest(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> BarRequest: ... - class BarResponse(Message): def __init__(self, ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> BarResponse: ... - class TestJsonName(Message): field_name1: int @@ -1679,9 +1319,6 @@ class TestJsonName(Message): field_name6: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestJsonName: ... - class TestHugeFieldNumbers(Message): class OptionalGroup(Message): @@ -1691,9 +1328,6 @@ class TestHugeFieldNumbers(Message): group_a: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestHugeFieldNumbers.OptionalGroup: ... - class StringStringMapEntry(Message): key: Text value: Text @@ -1703,20 +1337,6 @@ class TestHugeFieldNumbers(Message): value: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString( - cls, s: bytes) -> TestHugeFieldNumbers.StringStringMapEntry: ... - optional_int32: int - fixed_32: int - repeated_int32: RepeatedScalarFieldContainer[int] - packed_int32: RepeatedScalarFieldContainer[int] - optional_enum: ForeignEnum - optional_string: Text - optional_bytes: bytes - oneof_uint32: int - oneof_string: Text - oneof_bytes: bytes - @property def optional_message(self) -> ForeignMessage: ... @@ -1746,9 +1366,6 @@ class TestHugeFieldNumbers(Message): oneof_bytes: Optional[bytes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestHugeFieldNumbers: ... - class TestExtensionInsideTable(Message): field1: int @@ -1772,6 +1389,3 @@ class TestExtensionInsideTable(Message): field9: Optional[int] = ..., field10: Optional[int] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> TestExtensionInsideTable: ... diff --git a/third_party/2and3/google/protobuf/unittest_proto3_arena_pb2.pyi b/third_party/2and3/google/protobuf/unittest_proto3_arena_pb2.pyi index 9464062cc..32da8d4f2 100644 --- a/third_party/2and3/google/protobuf/unittest_proto3_arena_pb2.pyi +++ b/third_party/2and3/google/protobuf/unittest_proto3_arena_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.internal.containers import ( RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer, @@ -76,50 +77,6 @@ class TestAllTypes(Message): bb: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypes.NestedMessage: ... - optional_int32: int - optional_int64: int - optional_uint32: int - optional_uint64: int - optional_sint32: int - optional_sint64: int - optional_fixed32: int - optional_fixed64: int - optional_sfixed32: int - optional_sfixed64: int - optional_float: float - optional_double: float - optional_bool: bool - optional_string: Text - optional_bytes: bytes - optional_nested_enum: TestAllTypes.NestedEnum - optional_foreign_enum: ForeignEnum - optional_string_piece: Text - optional_cord: Text - repeated_int32: RepeatedScalarFieldContainer[int] - repeated_int64: RepeatedScalarFieldContainer[int] - repeated_uint32: RepeatedScalarFieldContainer[int] - repeated_uint64: RepeatedScalarFieldContainer[int] - repeated_sint32: RepeatedScalarFieldContainer[int] - repeated_sint64: RepeatedScalarFieldContainer[int] - repeated_fixed32: RepeatedScalarFieldContainer[int] - repeated_fixed64: RepeatedScalarFieldContainer[int] - repeated_sfixed32: RepeatedScalarFieldContainer[int] - repeated_sfixed64: RepeatedScalarFieldContainer[int] - repeated_float: RepeatedScalarFieldContainer[float] - repeated_double: RepeatedScalarFieldContainer[float] - repeated_bool: RepeatedScalarFieldContainer[bool] - repeated_string: RepeatedScalarFieldContainer[Text] - repeated_bytes: RepeatedScalarFieldContainer[bytes] - repeated_nested_enum: RepeatedScalarFieldContainer[TestAllTypes.NestedEnum] - repeated_foreign_enum: RepeatedScalarFieldContainer[ForeignEnum] - repeated_string_piece: RepeatedScalarFieldContainer[Text] - repeated_cord: RepeatedScalarFieldContainer[Text] - oneof_uint32: int - oneof_string: Text - oneof_bytes: bytes - @property def optional_nested_message(self) -> TestAllTypes.NestedMessage: ... @@ -212,9 +169,6 @@ class TestAllTypes(Message): oneof_bytes: Optional[bytes] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAllTypes: ... - class TestPackedTypes(Message): packed_int32: RepeatedScalarFieldContainer[int] @@ -249,9 +203,6 @@ class TestPackedTypes(Message): packed_enum: Optional[Iterable[ForeignEnum]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestPackedTypes: ... - class TestUnpackedTypes(Message): repeated_int32: RepeatedScalarFieldContainer[int] @@ -286,9 +237,6 @@ class TestUnpackedTypes(Message): repeated_nested_enum: Optional[Iterable[TestAllTypes.NestedEnum]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestUnpackedTypes: ... - class NestedTestAllTypes(Message): @@ -308,9 +256,6 @@ class NestedTestAllTypes(Message): repeated_child: Optional[Iterable[NestedTestAllTypes]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> NestedTestAllTypes: ... - class ForeignMessage(Message): c: int @@ -319,14 +264,8 @@ class ForeignMessage(Message): c: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> ForeignMessage: ... - class TestEmptyMessage(Message): def __init__(self, ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> TestEmptyMessage: ... diff --git a/third_party/2and3/google/protobuf/util/json_format_proto3_pb2.pyi b/third_party/2and3/google/protobuf/util/json_format_proto3_pb2.pyi index 04623137f..bda017000 100644 --- a/third_party/2and3/google/protobuf/util/json_format_proto3_pb2.pyi +++ b/third_party/2and3/google/protobuf/util/json_format_proto3_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.any_pb2 import ( Any, ) @@ -77,9 +78,6 @@ class MessageType(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> MessageType: ... - class TestMessage(Message): bool_value: bool @@ -135,9 +133,6 @@ class TestMessage(Message): repeated_message_value: Optional[Iterable[MessageType]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMessage: ... - class TestOneof(Message): oneof_int32_value: int @@ -156,9 +151,6 @@ class TestOneof(Message): oneof_message_value: Optional[MessageType] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestOneof: ... - class TestMap(Message): @@ -171,9 +163,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.BoolMapEntry: ... - class Int32MapEntry(Message): key: int value: int @@ -183,9 +172,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.Int32MapEntry: ... - class Int64MapEntry(Message): key: int value: int @@ -195,9 +181,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.Int64MapEntry: ... - class Uint32MapEntry(Message): key: int value: int @@ -207,9 +190,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.Uint32MapEntry: ... - class Uint64MapEntry(Message): key: int value: int @@ -219,9 +199,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.Uint64MapEntry: ... - class StringMapEntry(Message): key: Text value: int @@ -231,9 +208,6 @@ class TestMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap.StringMapEntry: ... - @property def bool_map(self) -> MutableMapping[bool, int]: ... @@ -261,9 +235,6 @@ class TestMap(Message): string_map: Optional[Mapping[Text, int]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestMap: ... - class TestNestedMap(Message): @@ -276,9 +247,6 @@ class TestNestedMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestNestedMap.BoolMapEntry: ... - class Int32MapEntry(Message): key: int value: int @@ -288,9 +256,6 @@ class TestNestedMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestNestedMap.Int32MapEntry: ... - class Int64MapEntry(Message): key: int value: int @@ -300,9 +265,6 @@ class TestNestedMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestNestedMap.Int64MapEntry: ... - class Uint32MapEntry(Message): key: int value: int @@ -312,9 +274,6 @@ class TestNestedMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestNestedMap.Uint32MapEntry: ... - class Uint64MapEntry(Message): key: int value: int @@ -324,9 +283,6 @@ class TestNestedMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestNestedMap.Uint64MapEntry: ... - class StringMapEntry(Message): key: Text value: int @@ -336,9 +292,6 @@ class TestNestedMap(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestNestedMap.StringMapEntry: ... - class MapMapEntry(Message): key: Text @@ -350,9 +303,6 @@ class TestNestedMap(Message): value: Optional[TestNestedMap] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestNestedMap.MapMapEntry: ... - @property def bool_map(self) -> MutableMapping[bool, int]: ... @@ -384,9 +334,6 @@ class TestNestedMap(Message): map_map: Optional[Mapping[Text, TestNestedMap]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestNestedMap: ... - class TestWrapper(Message): @@ -474,9 +421,6 @@ class TestWrapper(Message): repeated_bytes_value: Optional[Iterable[BytesValue]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestWrapper: ... - class TestTimestamp(Message): @@ -491,9 +435,6 @@ class TestTimestamp(Message): repeated_value: Optional[Iterable[Timestamp]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestTimestamp: ... - class TestDuration(Message): @@ -508,9 +449,6 @@ class TestDuration(Message): repeated_value: Optional[Iterable[Duration]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestDuration: ... - class TestFieldMask(Message): @@ -521,9 +459,6 @@ class TestFieldMask(Message): value: Optional[FieldMask] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestFieldMask: ... - class TestStruct(Message): @@ -538,9 +473,6 @@ class TestStruct(Message): repeated_value: Optional[Iterable[Struct]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestStruct: ... - class TestAny(Message): @@ -555,9 +487,6 @@ class TestAny(Message): repeated_value: Optional[Iterable[Any]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestAny: ... - class TestValue(Message): @@ -572,9 +501,6 @@ class TestValue(Message): repeated_value: Optional[Iterable[Value]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestValue: ... - class TestListValue(Message): @@ -589,9 +515,6 @@ class TestListValue(Message): repeated_value: Optional[Iterable[ListValue]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestListValue: ... - class TestBoolValue(Message): @@ -604,10 +527,6 @@ class TestBoolValue(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestBoolValue.BoolMapEntry: ... - bool_value: bool - @property def bool_map(self) -> MutableMapping[bool, int]: ... @@ -616,9 +535,6 @@ class TestBoolValue(Message): bool_map: Optional[Mapping[bool, int]] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestBoolValue: ... - class TestCustomJsonName(Message): value: int @@ -627,9 +543,6 @@ class TestCustomJsonName(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestCustomJsonName: ... - class TestExtensions(Message): @@ -640,9 +553,6 @@ class TestExtensions(Message): extensions: Optional[TestAllExtensions] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> TestExtensions: ... - class TestEnumValue(Message): enum_value1: EnumType @@ -654,6 +564,3 @@ class TestEnumValue(Message): enum_value2: Optional[EnumType] = ..., enum_value3: Optional[EnumType] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> TestEnumValue: ... diff --git a/third_party/2and3/google/protobuf/wrappers_pb2.pyi b/third_party/2and3/google/protobuf/wrappers_pb2.pyi index 6ff865d34..1e70f817e 100644 --- a/third_party/2and3/google/protobuf/wrappers_pb2.pyi +++ b/third_party/2and3/google/protobuf/wrappers_pb2.pyi @@ -1,3 +1,4 @@ + from google.protobuf.message import ( Message, ) @@ -14,9 +15,6 @@ class DoubleValue(Message): value: Optional[float] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> DoubleValue: ... - class FloatValue(Message): value: float @@ -25,9 +23,6 @@ class FloatValue(Message): value: Optional[float] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> FloatValue: ... - class Int64Value(Message): value: int @@ -36,9 +31,6 @@ class Int64Value(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Int64Value: ... - class UInt64Value(Message): value: int @@ -47,9 +39,6 @@ class UInt64Value(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> UInt64Value: ... - class Int32Value(Message): value: int @@ -58,9 +47,6 @@ class Int32Value(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> Int32Value: ... - class UInt32Value(Message): value: int @@ -69,9 +55,6 @@ class UInt32Value(Message): value: Optional[int] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> UInt32Value: ... - class BoolValue(Message): value: bool @@ -80,9 +63,6 @@ class BoolValue(Message): value: Optional[bool] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> BoolValue: ... - class StringValue(Message): value: Text @@ -91,9 +71,6 @@ class StringValue(Message): value: Optional[Text] = ..., ) -> None: ... - @classmethod - def FromString(cls, s: bytes) -> StringValue: ... - class BytesValue(Message): value: bytes @@ -101,6 +78,3 @@ class BytesValue(Message): def __init__(self, value: Optional[bytes] = ..., ) -> None: ... - - @classmethod - def FromString(cls, s: bytes) -> BytesValue: ...