Skip to content

Commit aa885ec

Browse files
authored
Flatten stubtest_allowlist for protobuf generated files (#6944)
I added stubtest testing for generated files within mypy-protobuf. There are many ways in which the protobuf code is doing *weird* things and we want the stubs to look a bit different. They're enumerated in the `stubtest_allowlist.txt` of mypy-protobuf, so squashing them here so that this one can focus on the non-generated files.
1 parent 3cbdb5a commit aa885ec

File tree

1 file changed

+4
-148
lines changed

1 file changed

+4
-148
lines changed
Lines changed: 4 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,13 @@
1+
# Generated pb2 methods diverge for a variety of reasons. They are tested
2+
# carefully in mypy-protobuf which internally runs stubtest. Skip those here.
3+
google.protobuf\..*_pb2\..*
4+
15
google.protobuf.__version__
2-
google.protobuf.any_pb2.Any.__init__
3-
google.protobuf.api_pb2.Api.__init__
4-
google.protobuf.api_pb2.Method.__init__
5-
google.protobuf.api_pb2.Mixin.__init__
6-
google.protobuf.compiler.plugin_pb2.CodeGeneratorRequest.__init__
7-
google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse.FEATURE_NONE
8-
google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse.FEATURE_PROTO3_OPTIONAL
9-
google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse.Feature
10-
google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse.File.__init__
11-
google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse._Feature
12-
google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse._FeatureEnumTypeWrapper
13-
google.protobuf.compiler.plugin_pb2.CodeGeneratorResponse.__init__
14-
google.protobuf.compiler.plugin_pb2.Version.__init__
156
google.protobuf.descriptor.Descriptor.__new__
167
google.protobuf.descriptor.FieldDescriptor.__init__
178
google.protobuf.descriptor.FieldDescriptor.__new__
189
google.protobuf.descriptor.ServiceDescriptor.__new__
1910
google.protobuf.descriptor._NestedDescriptorBase.GetTopLevelContainingType
20-
google.protobuf.descriptor_pb2.DescriptorProto.ExtensionRange.__init__
21-
google.protobuf.descriptor_pb2.DescriptorProto.ReservedRange.__init__
22-
google.protobuf.descriptor_pb2.DescriptorProto.__init__
23-
google.protobuf.descriptor_pb2.EnumDescriptorProto.EnumReservedRange.__init__
24-
google.protobuf.descriptor_pb2.EnumDescriptorProto.__init__
25-
google.protobuf.descriptor_pb2.EnumOptions.__init__
26-
google.protobuf.descriptor_pb2.EnumValueDescriptorProto.__init__
27-
google.protobuf.descriptor_pb2.EnumValueOptions.__init__
28-
google.protobuf.descriptor_pb2.ExtensionRangeOptions.__init__
29-
google.protobuf.descriptor_pb2.FieldDescriptorProto.LABEL_OPTIONAL
30-
google.protobuf.descriptor_pb2.FieldDescriptorProto.LABEL_REPEATED
31-
google.protobuf.descriptor_pb2.FieldDescriptorProto.LABEL_REQUIRED
32-
google.protobuf.descriptor_pb2.FieldDescriptorProto.Label
33-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_BOOL
34-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_BYTES
35-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_DOUBLE
36-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_ENUM
37-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_FIXED32
38-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_FIXED64
39-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_FLOAT
40-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_GROUP
41-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_INT32
42-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_INT64
43-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_MESSAGE
44-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_SFIXED32
45-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_SFIXED64
46-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_SINT32
47-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_SINT64
48-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_STRING
49-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_UINT32
50-
google.protobuf.descriptor_pb2.FieldDescriptorProto.TYPE_UINT64
51-
google.protobuf.descriptor_pb2.FieldDescriptorProto.Type
52-
google.protobuf.descriptor_pb2.FieldDescriptorProto._Label
53-
google.protobuf.descriptor_pb2.FieldDescriptorProto._LabelEnumTypeWrapper
54-
google.protobuf.descriptor_pb2.FieldDescriptorProto._Type
55-
google.protobuf.descriptor_pb2.FieldDescriptorProto._TypeEnumTypeWrapper
56-
google.protobuf.descriptor_pb2.FieldDescriptorProto.__init__
57-
google.protobuf.descriptor_pb2.FieldOptions.CORD
58-
google.protobuf.descriptor_pb2.FieldOptions.CType
59-
google.protobuf.descriptor_pb2.FieldOptions.JSType
60-
google.protobuf.descriptor_pb2.FieldOptions.JS_NORMAL
61-
google.protobuf.descriptor_pb2.FieldOptions.JS_NUMBER
62-
google.protobuf.descriptor_pb2.FieldOptions.JS_STRING
63-
google.protobuf.descriptor_pb2.FieldOptions.STRING
64-
google.protobuf.descriptor_pb2.FieldOptions.STRING_PIECE
65-
google.protobuf.descriptor_pb2.FieldOptions._CType
66-
google.protobuf.descriptor_pb2.FieldOptions._CTypeEnumTypeWrapper
67-
google.protobuf.descriptor_pb2.FieldOptions._JSType
68-
google.protobuf.descriptor_pb2.FieldOptions._JSTypeEnumTypeWrapper
69-
google.protobuf.descriptor_pb2.FieldOptions.__init__
70-
google.protobuf.descriptor_pb2.FileDescriptorProto.__init__
71-
google.protobuf.descriptor_pb2.FileDescriptorSet.__init__
72-
google.protobuf.descriptor_pb2.FileOptions.CODE_SIZE
73-
google.protobuf.descriptor_pb2.FileOptions.LITE_RUNTIME
74-
google.protobuf.descriptor_pb2.FileOptions.OptimizeMode
75-
google.protobuf.descriptor_pb2.FileOptions.SPEED
76-
google.protobuf.descriptor_pb2.FileOptions._OptimizeMode
77-
google.protobuf.descriptor_pb2.FileOptions._OptimizeModeEnumTypeWrapper
78-
google.protobuf.descriptor_pb2.FileOptions.__init__
79-
google.protobuf.descriptor_pb2.GeneratedCodeInfo.Annotation.__init__
80-
google.protobuf.descriptor_pb2.GeneratedCodeInfo.__init__
81-
google.protobuf.descriptor_pb2.MessageOptions.__init__
82-
google.protobuf.descriptor_pb2.MethodDescriptorProto.__init__
83-
google.protobuf.descriptor_pb2.MethodOptions.IDEMPOTENCY_UNKNOWN
84-
google.protobuf.descriptor_pb2.MethodOptions.IDEMPOTENT
85-
google.protobuf.descriptor_pb2.MethodOptions.IdempotencyLevel
86-
google.protobuf.descriptor_pb2.MethodOptions.NO_SIDE_EFFECTS
87-
google.protobuf.descriptor_pb2.MethodOptions._IdempotencyLevel
88-
google.protobuf.descriptor_pb2.MethodOptions._IdempotencyLevelEnumTypeWrapper
89-
google.protobuf.descriptor_pb2.MethodOptions.__init__
90-
google.protobuf.descriptor_pb2.OneofDescriptorProto.__init__
91-
google.protobuf.descriptor_pb2.OneofOptions.__init__
92-
google.protobuf.descriptor_pb2.ServiceDescriptorProto.__init__
93-
google.protobuf.descriptor_pb2.ServiceOptions.__init__
94-
google.protobuf.descriptor_pb2.SourceCodeInfo.Location.__init__
95-
google.protobuf.descriptor_pb2.SourceCodeInfo.__init__
96-
google.protobuf.descriptor_pb2.UninterpretedOption.NamePart.__init__
97-
google.protobuf.descriptor_pb2.UninterpretedOption.__init__
98-
google.protobuf.duration_pb2.Duration.__init__
99-
google.protobuf.empty_pb2.Empty.__init__
100-
google.protobuf.field_mask_pb2.FieldMask.__init__
10111
google.protobuf.internal.containers.BaseContainer.sort
10212
google.protobuf.internal.containers.MessageMap.__init__
10313
google.protobuf.internal.containers.MessageMap.get
@@ -122,58 +32,4 @@ google.protobuf.message.Message.SerializePartialToString
12232
google.protobuf.message.Message.SerializeToString
12333
google.protobuf.message.Message.__init__
12434
google.protobuf.service.Service.GetDescriptor
125-
google.protobuf.source_context_pb2.SourceContext.__init__
126-
google.protobuf.struct_pb2.ListValue.__init__
127-
google.protobuf.struct_pb2.NULL_VALUE
128-
google.protobuf.struct_pb2.NullValue
129-
google.protobuf.struct_pb2.Struct.FieldsEntry.__init__
130-
google.protobuf.struct_pb2.Struct.__init__
131-
google.protobuf.struct_pb2.Value.__init__
13235
google.protobuf.text_format.MessageToBytes
133-
google.protobuf.timestamp_pb2.Timestamp.__init__
134-
google.protobuf.type_pb2.Enum.__init__
135-
google.protobuf.type_pb2.EnumValue.__init__
136-
google.protobuf.type_pb2.Field.CARDINALITY_OPTIONAL
137-
google.protobuf.type_pb2.Field.CARDINALITY_REPEATED
138-
google.protobuf.type_pb2.Field.CARDINALITY_REQUIRED
139-
google.protobuf.type_pb2.Field.CARDINALITY_UNKNOWN
140-
google.protobuf.type_pb2.Field.Cardinality
141-
google.protobuf.type_pb2.Field.Kind
142-
google.protobuf.type_pb2.Field.TYPE_BOOL
143-
google.protobuf.type_pb2.Field.TYPE_BYTES
144-
google.protobuf.type_pb2.Field.TYPE_DOUBLE
145-
google.protobuf.type_pb2.Field.TYPE_ENUM
146-
google.protobuf.type_pb2.Field.TYPE_FIXED32
147-
google.protobuf.type_pb2.Field.TYPE_FIXED64
148-
google.protobuf.type_pb2.Field.TYPE_FLOAT
149-
google.protobuf.type_pb2.Field.TYPE_GROUP
150-
google.protobuf.type_pb2.Field.TYPE_INT32
151-
google.protobuf.type_pb2.Field.TYPE_INT64
152-
google.protobuf.type_pb2.Field.TYPE_MESSAGE
153-
google.protobuf.type_pb2.Field.TYPE_SFIXED32
154-
google.protobuf.type_pb2.Field.TYPE_SFIXED64
155-
google.protobuf.type_pb2.Field.TYPE_SINT32
156-
google.protobuf.type_pb2.Field.TYPE_SINT64
157-
google.protobuf.type_pb2.Field.TYPE_STRING
158-
google.protobuf.type_pb2.Field.TYPE_UINT32
159-
google.protobuf.type_pb2.Field.TYPE_UINT64
160-
google.protobuf.type_pb2.Field.TYPE_UNKNOWN
161-
google.protobuf.type_pb2.Field._Cardinality
162-
google.protobuf.type_pb2.Field._CardinalityEnumTypeWrapper
163-
google.protobuf.type_pb2.Field._Kind
164-
google.protobuf.type_pb2.Field._KindEnumTypeWrapper
165-
google.protobuf.type_pb2.Field.__init__
166-
google.protobuf.type_pb2.Option.__init__
167-
google.protobuf.type_pb2.SYNTAX_PROTO2
168-
google.protobuf.type_pb2.SYNTAX_PROTO3
169-
google.protobuf.type_pb2.Syntax
170-
google.protobuf.type_pb2.Type.__init__
171-
google.protobuf.wrappers_pb2.BoolValue.__init__
172-
google.protobuf.wrappers_pb2.BytesValue.__init__
173-
google.protobuf.wrappers_pb2.DoubleValue.__init__
174-
google.protobuf.wrappers_pb2.FloatValue.__init__
175-
google.protobuf.wrappers_pb2.Int32Value.__init__
176-
google.protobuf.wrappers_pb2.Int64Value.__init__
177-
google.protobuf.wrappers_pb2.StringValue.__init__
178-
google.protobuf.wrappers_pb2.UInt32Value.__init__
179-
google.protobuf.wrappers_pb2.UInt64Value.__init__

0 commit comments

Comments
 (0)