Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions third_party/2/enum.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
from typing import List, Any, TypeVar, Type
from typing import List, Any, TypeVar, Type, Iterable, Iterator

class Enum:
def __new__(cls, value: Any) -> None: ...
_T = TypeVar('_T', bound=Enum)
class EnumMeta(type, Iterable[Enum]):
def __iter__(self: Type[_T]) -> Iterator[_T]: ... # type: ignore

class Enum(metaclass=EnumMeta):
def __new__(cls: Type[_T], value: Any) -> _T: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
def __dir__(self) -> List[str]: ...
Expand All @@ -12,8 +16,6 @@ class Enum:
name = ... # type: str
value = ... # type: Any

_T = TypeVar('_T')

class IntEnum(int, Enum): # type: ignore
def __new__(cls: Type[_T], value: Any) -> _T: ...

Expand Down