mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
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
214c77e1b7/src/google/protobuf/compiler/plugin.proto (L112)
This commit is contained in:
@@ -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]: ...
|
||||
|
||||
Reference in New Issue
Block a user