--- /dev/null
+from typing import List, Any, TypeVar, Union, Iterable, Iterator, TypeVar, Generic, Type, Sized, Reversible, Container, Mapping\r
+from abc import ABCMeta\r
+\r
+_T = TypeVar('_T')\r
+_S = TypeVar('_S', bound=Type[Enum])\r
+\r
+# Note: EnumMeta actually subclasses type directly, not ABCMeta.\r
+# This is a temporary workaround to allow multiple creation of enums with builtins\r
+# such as str as mixins, which due to the handling of ABCs of builtin types, cause\r
+# spurious inconsistent metaclass structure. See #1595.\r
+class EnumMeta(ABCMeta, Iterable[Enum], Sized, Reversible[Enum], Container[Enum]):\r
+ def __iter__(self: Type[_T]) -> Iterator[_T]: ...\r
+ def __reversed__(self: Type[_T]) -> Iterator[_T]: ...\r
+ def __contains__(self, member: Any) -> bool: ...\r
+ def __getitem__(self: Type[_T], name: str) -> _T: ...\r
+ @property\r
+ def __members__(self: Type[_T]) -> Mapping[str, _T]: ...\r
+ def __len__(self) -> int: ...\r
+\r
+class Enum(metaclass=EnumMeta):\r
+ def __new__(cls: Type[_T], value: Any) -> _T: ...\r
+ def __repr__(self) -> str: ...\r
+ def __str__(self) -> str: ...\r
+ def __dir__(self) -> List[str]: ...\r
+ def __format__(self, format_spec: str) -> str: ...\r
+ def __hash__(self) -> Any: ...\r
+ def __reduce_ex__(self, proto: Any) -> Any: ...\r
+\r
+ name = ... # type: str\r
+ value = ... # type: Any\r
+\r
+class IntEnum(int, Enum):\r
+ value = ... # type: int\r
+\r
+def unique(enumeration: _S) -> _S: ...\r