mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 04:11:28 +08:00
Backport enum for 2.7.
This commit is contained in:
19
third_party/2.7/enum.pyi
vendored
Normal file
19
third_party/2.7/enum.pyi
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
from typing import List, Any, TypeVar
|
||||
|
||||
class Enum:
|
||||
def __new__(cls, value: Any) -> None: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __str__(self) -> str: ...
|
||||
def __dir__(self) -> List[str]: ...
|
||||
def __format__(self, format_spec: str) -> str: ...
|
||||
def __hash__(self) -> Any: ...
|
||||
def __reduce_ex__(self, proto: Any) -> Any: ...
|
||||
|
||||
name = ... # type: str
|
||||
value = None # type: Any
|
||||
|
||||
class IntEnum(int, Enum): ...
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
def unique(enumeration: _T) -> _T: ...
|
||||
Reference in New Issue
Block a user