diff --git a/stubs/protobuf/google/protobuf/internal/enum_type_wrapper.pyi b/stubs/protobuf/google/protobuf/internal/enum_type_wrapper.pyi index 079fca6a31cc..f85bb54bb817 100644 --- a/stubs/protobuf/google/protobuf/internal/enum_type_wrapper.pyi +++ b/stubs/protobuf/google/protobuf/internal/enum_type_wrapper.pyi @@ -1,4 +1,4 @@ -from typing import Generic, List, Tuple, TypeVar, Union +from typing import Generic, List, Text, Tuple, TypeVar from google.protobuf.descriptor import EnumDescriptor @@ -10,7 +10,7 @@ class _EnumTypeWrapper(Generic[_V]): DESCRIPTOR: EnumDescriptor def __init__(self, enum_type: EnumDescriptor) -> None: ... def Name(self, number: _V) -> str: ... - def Value(self, name: Union[str, bytes]) -> _V: ... + def Value(self, name: Text | bytes) -> _V: ... def keys(self) -> List[str]: ... def values(self) -> List[_V]: ... def items(self) -> List[Tuple[str, _V]]: ...