Fix well known types in protobuf stubs (#4845)

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
Ivan Levkivskyi
2020-12-21 16:20:53 +00:00
committed by GitHub
parent 32420769cd
commit 472d830876
5 changed files with 16 additions and 6 deletions

View File

@@ -9,6 +9,8 @@ from google.protobuf.message import (
Message as google___protobuf___message___Message,
)
from google.protobuf.internal import well_known_types
from typing import (
Optional as typing___Optional,
Text as typing___Text,
@@ -27,7 +29,7 @@ builtin___int = int
DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ...
class Any(google___protobuf___message___Message):
class Any(google___protobuf___message___Message, well_known_types.Any_):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
type_url: typing___Text = ...
value: builtin___bytes = ...

View File

@@ -9,6 +9,8 @@ from google.protobuf.message import (
Message as google___protobuf___message___Message,
)
from google.protobuf.internal import well_known_types
from typing import (
Optional as typing___Optional,
)
@@ -26,7 +28,7 @@ builtin___int = int
DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ...
class Duration(google___protobuf___message___Message):
class Duration(google___protobuf___message___Message, well_known_types.Duration):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
seconds: builtin___int = ...
nanos: builtin___int = ...

View File

@@ -13,6 +13,8 @@ from google.protobuf.message import (
Message as google___protobuf___message___Message,
)
from google.protobuf.internal import well_known_types
from typing import (
Iterable as typing___Iterable,
Optional as typing___Optional,
@@ -32,7 +34,7 @@ builtin___int = int
DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ...
class FieldMask(google___protobuf___message___Message):
class FieldMask(google___protobuf___message___Message, well_known_types.FieldMask):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
paths: google___protobuf___internal___containers___RepeatedScalarFieldContainer[typing___Text] = ...

View File

@@ -18,6 +18,8 @@ from google.protobuf.message import (
Message as google___protobuf___message___Message,
)
from google.protobuf.internal import well_known_types
from typing import (
Iterable as typing___Iterable,
Mapping as typing___Mapping,
@@ -50,7 +52,7 @@ class _NullValue(google___protobuf___internal___enum_type_wrapper____EnumTypeWra
NULL_VALUE = typing___cast(NullValueValue, 0)
type___NullValue = NullValue
class Struct(google___protobuf___message___Message):
class Struct(google___protobuf___message___Message, well_known_types.Struct):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
class FieldsEntry(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
@@ -106,7 +108,7 @@ class Value(google___protobuf___message___Message):
def WhichOneof(self, oneof_group: typing_extensions___Literal[u"kind",b"kind"]) -> typing_extensions___Literal["null_value","number_value","string_value","bool_value","struct_value","list_value"]: ...
type___Value = Value
class ListValue(google___protobuf___message___Message):
class ListValue(google___protobuf___message___Message, well_known_types.ListValue):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
@property

View File

@@ -9,6 +9,8 @@ from google.protobuf.message import (
Message as google___protobuf___message___Message,
)
from google.protobuf.internal import well_known_types
from typing import (
Optional as typing___Optional,
)
@@ -26,7 +28,7 @@ builtin___int = int
DESCRIPTOR: google___protobuf___descriptor___FileDescriptor = ...
class Timestamp(google___protobuf___message___Message):
class Timestamp(google___protobuf___message___Message, well_known_types.Timestamp):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
seconds: builtin___int = ...
nanos: builtin___int = ...