Copy stdlib/3.4/enum.pyi to third_party/3/enum.pyi to satisfy tests (#2214)

Fix test breakage caused by #2118.
This commit is contained in:
Guido van Rossum
2018-06-11 14:28:47 -07:00
committed by GitHub
parent f65caed181
commit c5e98308c0

View File

@@ -11,13 +11,14 @@ _S = TypeVar('_S', bound=Type[Enum])
# such as str as mixins, which due to the handling of ABCs of builtin types, cause
# spurious inconsistent metaclass structure. See #1595.
# Structurally: Iterable[T], Reversible[T], Container[T] where T is the enum itself
class EnumMeta(ABCMeta, Sized):
class EnumMeta(ABCMeta):
def __iter__(self: Type[_T]) -> Iterator[_T]: ...
def __reversed__(self: Type[_T]) -> Iterator[_T]: ...
def __contains__(self: Type[_T], member: Any) -> bool: ...
def __getitem__(self: Type[_T], name: str) -> _T: ...
@property
def __members__(self: Type[_T]) -> Mapping[str, _T]: ...
def __len__(self) -> int: ...
class Enum(metaclass=EnumMeta):
def __new__(cls: Type[_T], value: Any) -> _T: ...