Skip to content

Fix well known types in protobuf stubs #4845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 21, 2020
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
4 changes: 3 additions & 1 deletion third_party/2and3/google/protobuf/any_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 = ...
Expand Down
4 changes: 3 additions & 1 deletion third_party/2and3/google/protobuf/duration_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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 = ...
Expand Down
4 changes: 3 additions & 1 deletion third_party/2and3/google/protobuf/field_mask_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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] = ...

Expand Down
6 changes: 4 additions & 2 deletions third_party/2and3/google/protobuf/struct_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 = ...
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion third_party/2and3/google/protobuf/timestamp_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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 = ...
Expand Down