Skip to content

Commit 246f7e7

Browse files
authored
protobuf: fix stubtest errors (#8735)
1 parent 205901e commit 246f7e7

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

stubs/protobuf/@tests/stubtest_allowlist.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ google.protobuf.text_format.MessageToBytes
2424
# a function. Typeshed's typing is more useful
2525
google.protobuf.service.Service.GetDescriptor
2626

27-
# These are deliberately omitted in the stub
28-
# due to the fact that these classes have conflicting signatures for __init__/__new__.
27+
# These are deliberately omitted in the stub.
2928
# The classes also can't be constructed directly anyway,
3029
# so the signatures of their constructors are somewhat irrelevant.
3130
google.protobuf.descriptor.Descriptor.__init__
32-
google.protobuf.descriptor.Descriptor.__new__
3331
google.protobuf.descriptor.ServiceDescriptor.__init__
34-
google.protobuf.descriptor.ServiceDescriptor.__new__
3532

3633
# Set to None at runtime - which doesn't match the Sequence base class.
3734
# It's a hack - just allow it.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class GeneratedProtocolMessageType(type):
22
def __new__(cls, name, bases, dictionary): ...
3-
def __init__(self, name, bases, dictionary) -> None: ...
3+
def __init__(cls, name, bases, dictionary) -> None: ...
44

55
def ParseMessage(descriptor, byte_str): ...
66
def MakeClass(descriptor): ...

0 commit comments

Comments
 (0)