mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
protobuf: Delete some __new__ and __init__ methods (#8088)
This commit is contained in:
@@ -23,3 +23,12 @@ google.protobuf.text_format.MessageToBytes
|
||||
# Stubbed as static method, but actually exists as a property that's
|
||||
# a function. Typeshed's typing is more useful
|
||||
google.protobuf.service.Service.GetDescriptor
|
||||
|
||||
# These are deliberately omitted in the stub
|
||||
# due to the fact that these classes have conflicting signatures for __init__/__new__.
|
||||
# The classes also can't be constructed directly anyway,
|
||||
# so the signatures of their constructors are somewhat irrelevant.
|
||||
google.protobuf.descriptor.Descriptor.__init__
|
||||
google.protobuf.descriptor.Descriptor.__new__
|
||||
google.protobuf.descriptor.ServiceDescriptor.__init__
|
||||
google.protobuf.descriptor.ServiceDescriptor.__new__
|
||||
|
||||
@@ -45,27 +45,6 @@ class _NestedDescriptorBase(DescriptorBase):
|
||||
def CopyToProto(self, proto): ...
|
||||
|
||||
class Descriptor(_NestedDescriptorBase):
|
||||
def __new__(
|
||||
cls,
|
||||
name=...,
|
||||
full_name=...,
|
||||
filename=...,
|
||||
containing_type=...,
|
||||
fields=...,
|
||||
nested_types=...,
|
||||
enum_types=...,
|
||||
extensions=...,
|
||||
options=...,
|
||||
serialized_options=...,
|
||||
is_extendable=...,
|
||||
extension_ranges=...,
|
||||
oneofs=...,
|
||||
file=...,
|
||||
serialized_start=...,
|
||||
serialized_end=...,
|
||||
syntax=...,
|
||||
create_key=...,
|
||||
): ...
|
||||
fields: Any
|
||||
fields_by_number: Any
|
||||
fields_by_name: Any
|
||||
@@ -81,27 +60,6 @@ class Descriptor(_NestedDescriptorBase):
|
||||
oneofs: Any
|
||||
oneofs_by_name: Any
|
||||
syntax: Any
|
||||
def __init__(
|
||||
self,
|
||||
name,
|
||||
full_name,
|
||||
filename,
|
||||
containing_type,
|
||||
fields,
|
||||
nested_types,
|
||||
enum_types,
|
||||
extensions,
|
||||
options=...,
|
||||
serialized_options=...,
|
||||
is_extendable=...,
|
||||
extension_ranges=...,
|
||||
oneofs=...,
|
||||
file=...,
|
||||
serialized_start=...,
|
||||
serialized_end=...,
|
||||
syntax=...,
|
||||
create_key=...,
|
||||
) -> None: ...
|
||||
def EnumValueName(self, enum, value): ...
|
||||
def CopyToProto(self, proto): ...
|
||||
def GetOptions(self) -> MessageOptions: ...
|
||||
@@ -266,35 +224,9 @@ class OneofDescriptor:
|
||||
def GetOptions(self) -> OneofOptions: ...
|
||||
|
||||
class ServiceDescriptor(_NestedDescriptorBase):
|
||||
def __new__(
|
||||
cls,
|
||||
name=...,
|
||||
full_name=...,
|
||||
index=...,
|
||||
methods=...,
|
||||
options=...,
|
||||
serialized_options=...,
|
||||
file=...,
|
||||
serialized_start=...,
|
||||
serialized_end=...,
|
||||
create_key=...,
|
||||
): ...
|
||||
index: Any
|
||||
methods: Any
|
||||
methods_by_name: Any
|
||||
def __init__(
|
||||
self,
|
||||
name,
|
||||
full_name,
|
||||
index,
|
||||
methods,
|
||||
options=...,
|
||||
serialized_options=...,
|
||||
file=...,
|
||||
serialized_start=...,
|
||||
serialized_end=...,
|
||||
create_key=...,
|
||||
) -> None: ...
|
||||
def FindMethodByName(self, name): ...
|
||||
def CopyToProto(self, proto): ...
|
||||
def GetOptions(self) -> ServiceOptions: ...
|
||||
|
||||
Reference in New Issue
Block a user