mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Add missing protobuf stubs (#2368)
Added a few stubs to Protobuf descriptors. These appear in descriptor.py. These are all present in https://github.com/google/protobuf/blob/master/python/google/protobuf/descriptor.py.
This commit is contained in:
committed by
Ivan Levkivskyi
parent
7c263e3935
commit
e9a7f7cc0d
@@ -130,6 +130,7 @@ class OneofDescriptor:
|
||||
class ServiceDescriptor(_NestedDescriptorBase):
|
||||
index = ... # type: Any
|
||||
methods = ... # type: Any
|
||||
methods_by_name = ... # type: Any
|
||||
def __init__(self, name, full_name, index, methods, options=..., file=..., serialized_start=..., serialized_end=...) -> None: ...
|
||||
def FindMethodByName(self, name): ...
|
||||
def CopyToProto(self, proto): ...
|
||||
@@ -144,8 +145,9 @@ class MethodDescriptor(DescriptorBase):
|
||||
def __init__(self, name, full_name, index, containing_service, input_type, output_type, options=...) -> None: ...
|
||||
|
||||
class FileDescriptor(DescriptorBase):
|
||||
def __new__(cls, name, package, options=..., serialized_pb=..., dependencies=..., syntax=...): ...
|
||||
def __new__(cls, name, package, options=..., serialized_pb=..., dependencies=..., public_dependencies=..., syntax=..., pool=...): ...
|
||||
_options = ... # type: Any
|
||||
pool = ... # type: Any
|
||||
message_types_by_name = ... # type: Any
|
||||
name = ... # type: Any
|
||||
package = ... # type: Any
|
||||
@@ -153,8 +155,10 @@ class FileDescriptor(DescriptorBase):
|
||||
serialized_pb = ... # type: Any
|
||||
enum_types_by_name = ... # type: Any
|
||||
extensions_by_name = ... # type: Any
|
||||
services_by_name = ... # type: Any
|
||||
dependencies = ... # type: Any
|
||||
def __init__(self, name, package, options=..., serialized_pb=..., dependencies=..., syntax=...) -> None: ...
|
||||
public_dependencies = ... # type: Any
|
||||
def __init__(self, name, package, options=..., serialized_pb=..., dependencies=..., public_dependencies=..., syntax=..., pool=...) -> None: ...
|
||||
def CopyToProto(self, proto): ...
|
||||
|
||||
def MakeDescriptor(desc_proto, package=..., build_file_if_cpp=..., syntax=...): ...
|
||||
|
||||
Reference in New Issue
Block a user