Simplify and correct many numeric unions (#7906)

Unblocks PyCQA/flake8-pyi#222
This commit is contained in:
Alex Waygood authored and GitHub committed 2022-05-21 15:25:00 +01:00
1 parent 7576805aee
commit 76a4bd796b
17 files changed
+30 -26

No files matched your search

@@ -10,7 +10,7 @@ from google.protobuf.message import Message
_T = TypeVar("_T")
_K = TypeVar("_K", bound=bool | int | str)
_ScalarV = TypeVar("_ScalarV", bound=bool | int | float | str | bytes)
_ScalarV = TypeVar("_ScalarV", bound=bool | float | str | bytes)
_MessageV = TypeVar("_MessageV", bound=Message)
_M = TypeVar("_M")
@@ -8,7 +8,7 @@ from google.protobuf.message import Message
_ContainerMessageT = TypeVar("_ContainerMessageT", bound=Message)
_ExtenderMessageT = TypeVar(
"_ExtenderMessageT",
bound=Message | RepeatedScalarFieldContainer[Any] | RepeatedCompositeFieldContainer[Any] | bool | int | float | str | bytes,
bound=Message | RepeatedScalarFieldContainer[Any] | RepeatedCompositeFieldContainer[Any] | bool | float | str | bytes,
)
class _ExtensionFieldDescriptor(FieldDescriptor, Generic[_ContainerMessageT, _ExtenderMessageT]): ...