Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions third_party/2and3/google/protobuf/any_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@

from google.protobuf.message import (
Message,
)
from google.protobuf.message import Message
from google.protobuf.internal import well_known_types

from typing import (
Optional,
Text,
)

from typing import Optional, Text

class Any(Message, well_known_types.Any_):
type_url: Text
value: bytes

def __init__(self,
type_url: Optional[Text] = ...,
value: Optional[bytes] = ...,
) -> None: ...
def __init__(self, type_url: Optional[Text] = ..., value: Optional[bytes] = ...) -> None: ...
30 changes: 7 additions & 23 deletions third_party/2and3/google/protobuf/any_test_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,30 +1,14 @@

from google.protobuf.any_pb2 import (
Any,
)
from google.protobuf.internal.containers import (
RepeatedCompositeFieldContainer,
)
from google.protobuf.message import (
Message,
)
from typing import (
Iterable,
Optional,
)

from google.protobuf.any_pb2 import Any
from google.protobuf.internal.containers import RepeatedCompositeFieldContainer
from google.protobuf.message import Message
from typing import Iterable, Optional

class TestAny(Message):
int32_value: int

@property
def any_value(self) -> Any: ...

@property
def repeated_any_value(self) -> RepeatedCompositeFieldContainer[Any]: ...

def __init__(self,
int32_value: Optional[int] = ...,
any_value: Optional[Any] = ...,
repeated_any_value: Optional[Iterable[Any]] = ...,
) -> None: ...
def __init__(
self, int32_value: Optional[int] = ..., any_value: Optional[Any] = ..., repeated_any_value: Optional[Iterable[Any]] = ...
) -> None: ...
78 changes: 26 additions & 52 deletions third_party/2and3/google/protobuf/api_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,51 +1,31 @@

from google.protobuf.internal.containers import (
RepeatedCompositeFieldContainer,
)
from google.protobuf.message import (
Message,
)
from google.protobuf.source_context_pb2 import (
SourceContext,
)
from google.protobuf.type_pb2 import (
Option,
Syntax,
)
from typing import (
Iterable,
Optional,
Text,
)

from google.protobuf.internal.containers import RepeatedCompositeFieldContainer
from google.protobuf.message import Message
from google.protobuf.source_context_pb2 import SourceContext
from google.protobuf.type_pb2 import Option, Syntax
from typing import Iterable, Optional, Text

class Api(Message):
name: Text
version: Text
syntax: Syntax

@property
def methods(self) -> RepeatedCompositeFieldContainer[Method]: ...

@property
def options(self) -> RepeatedCompositeFieldContainer[Option]: ...

@property
def source_context(self) -> SourceContext: ...

@property
def mixins(self) -> RepeatedCompositeFieldContainer[Mixin]: ...

def __init__(self,
name: Optional[Text] = ...,
methods: Optional[Iterable[Method]] = ...,
options: Optional[Iterable[Option]] = ...,
version: Optional[Text] = ...,
source_context: Optional[SourceContext] = ...,
mixins: Optional[Iterable[Mixin]] = ...,
syntax: Optional[Syntax] = ...,
) -> None: ...

def __init__(
self,
name: Optional[Text] = ...,
methods: Optional[Iterable[Method]] = ...,
options: Optional[Iterable[Option]] = ...,
version: Optional[Text] = ...,
source_context: Optional[SourceContext] = ...,
mixins: Optional[Iterable[Mixin]] = ...,
syntax: Optional[Syntax] = ...,
) -> None: ...

class Method(Message):
name: Text
Expand All @@ -54,26 +34,20 @@ class Method(Message):
response_type_url: Text
response_streaming: bool
syntax: Syntax

@property
def options(self) -> RepeatedCompositeFieldContainer[Option]: ...

def __init__(self,
name: Optional[Text] = ...,
request_type_url: Optional[Text] = ...,
request_streaming: Optional[bool] = ...,
response_type_url: Optional[Text] = ...,
response_streaming: Optional[bool] = ...,
options: Optional[Iterable[Option]] = ...,
syntax: Optional[Syntax] = ...,
) -> None: ...

def __init__(
self,
name: Optional[Text] = ...,
request_type_url: Optional[Text] = ...,
request_streaming: Optional[bool] = ...,
response_type_url: Optional[Text] = ...,
response_streaming: Optional[bool] = ...,
options: Optional[Iterable[Option]] = ...,
syntax: Optional[Syntax] = ...,
) -> None: ...

class Mixin(Message):
name: Text
root: Text

def __init__(self,
name: Optional[Text] = ...,
root: Optional[Text] = ...,
) -> None: ...
def __init__(self, name: Optional[Text] = ..., root: Optional[Text] = ...) -> None: ...
67 changes: 19 additions & 48 deletions third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,70 +1,41 @@

from google.protobuf.descriptor_pb2 import (
FileDescriptorProto,
)
from google.protobuf.internal.containers import (
RepeatedCompositeFieldContainer,
RepeatedScalarFieldContainer,
)
from google.protobuf.message import (
Message,
)
from typing import (
Iterable,
Optional,
Text,
)

from google.protobuf.descriptor_pb2 import FileDescriptorProto
from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer
from google.protobuf.message import Message
from typing import Iterable, Optional, Text

class Version(Message):
major: int
minor: int
patch: int
suffix: Text

def __init__(self,
major: Optional[int] = ...,
minor: Optional[int] = ...,
patch: Optional[int] = ...,
suffix: Optional[Text] = ...,
) -> None: ...

def __init__(
self, major: Optional[int] = ..., minor: Optional[int] = ..., patch: Optional[int] = ..., suffix: Optional[Text] = ...
) -> None: ...

class CodeGeneratorRequest(Message):
file_to_generate: RepeatedScalarFieldContainer[Text]
parameter: Text

@property
def proto_file(self) -> RepeatedCompositeFieldContainer[FileDescriptorProto]: ...

@property
def compiler_version(self) -> Version: ...

def __init__(self,
file_to_generate: Optional[Iterable[Text]] = ...,
parameter: Optional[Text] = ...,
proto_file: Optional[Iterable[FileDescriptorProto]] = ...,
compiler_version: Optional[Version] = ...,
) -> None: ...

def __init__(
self,
file_to_generate: Optional[Iterable[Text]] = ...,
parameter: Optional[Text] = ...,
proto_file: Optional[Iterable[FileDescriptorProto]] = ...,
compiler_version: Optional[Version] = ...,
) -> None: ...

class CodeGeneratorResponse(Message):

class File(Message):
name: Text
insertion_point: Text
content: Text

def __init__(self,
name: Optional[Text] = ...,
insertion_point: Optional[Text] = ...,
content: Optional[Text] = ...,
) -> None: ...

def __init__(
self, name: Optional[Text] = ..., insertion_point: Optional[Text] = ..., content: Optional[Text] = ...
) -> None: ...
error: Text
@property
def file(self) -> RepeatedCompositeFieldContainer[CodeGeneratorResponse.File]: ...

def __init__(self,
error: Optional[Text] = ...,
file: Optional[Iterable[CodeGeneratorResponse.File]] = ...,
) -> None: ...
def __init__(self, error: Optional[Text] = ..., file: Optional[Iterable[CodeGeneratorResponse.File]] = ...) -> None: ...
Loading