Skip to content

Commit

Permalink
Support arbitrary values for extension values
Browse files Browse the repository at this point in the history
Proto itself supports primitives, not just messages.
See nipunn1313/mypy-protobuf#244 for an example
motivating this change.

Test Plan: I was able to use MYPYPATH to test an updated version of
mypy-protobuf with this change.
  • Loading branch information
nipunn1313 committed Jul 14, 2021
1 parent 0cd4ee3 commit 9c47829
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stubs/protobuf/google/protobuf/internal/extension_dict.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from google.protobuf.descriptor import FieldDescriptor
from google.protobuf.message import Message

_ContainerMessageT = TypeVar("_ContainerMessageT", bound=Message)
_ExtenderMessageT = TypeVar("_ExtenderMessageT", bound=Message)
_ExtenderMessageT = TypeVar("_ExtenderMessageT")

class _ExtensionFieldDescriptor(FieldDescriptor, Generic[_ContainerMessageT, _ExtenderMessageT]): ...

Expand Down

0 comments on commit 9c47829

Please sign in to comment.