From fd6bb39f558fef00f1952cd5f900deb5650e02ea Mon Sep 17 00:00:00 2001 From: henribru <6639509+henribru@users.noreply.github.com> Date: Sun, 1 Nov 2020 22:09:49 +0100 Subject: [PATCH] Update CodeGeneratorResponse (#4680) Add Feature enum and supported_features. These are related to the optional proto3 fields introduced in 3.12.0, see https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.0 and https://github.com/protocolbuffers/protobuf/blob/214c77e1b76e63e512bd675d1c300c80438642b6/src/google/protobuf/compiler/plugin.proto#L112 --- third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi b/third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi index 24e491afa..bd8a0cb3f 100644 --- a/third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi +++ b/third_party/2and3/google/protobuf/compiler/plugin_pb2.pyi @@ -2,6 +2,7 @@ from typing import Iterable, Optional, Text from google.protobuf.descriptor_pb2 import FileDescriptorProto from google.protobuf.internal.containers import RepeatedCompositeFieldContainer, RepeatedScalarFieldContainer +from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper from google.protobuf.message import Message class Version(Message): @@ -36,6 +37,13 @@ class CodeGeneratorResponse(Message): def __init__( self, name: Optional[Text] = ..., insertion_point: Optional[Text] = ..., content: Optional[Text] = ... ) -> None: ... + class _Feature(EnumTypeWrapper): + FEATURE_NONE: int + FEATURE_PROTO_3_OPTIONAL: int + Feature: CodeGeneratorResponse._Feature + FEATURE_NONE: int + FEATURE_PROTO_3_OPTIONAL: int + supported_features: int error: Text @property def file(self) -> RepeatedCompositeFieldContainer[CodeGeneratorResponse.File]: ...