File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class Enum(metaclass=EnumMeta):
45
45
46
46
class IntEnum (int , Enum ):
47
47
value : int
48
+ def __new__ (cls : Type [_T ], value : Union [int , _T ]) -> _T : ...
48
49
49
50
def unique (enumeration : _S ) -> _S : ...
50
51
@@ -53,6 +54,7 @@ _auto_null: Any
53
54
# subclassing IntFlag so it picks up all implemented base functions, best modeling behavior of enum.auto()
54
55
class auto (IntFlag ):
55
56
value : Any
57
+ def __new__ (cls : Type [_T ]) -> _T : ...
56
58
57
59
class Flag (Enum ):
58
60
def __contains__ (self : _T , other : _T ) -> bool : ...
@@ -65,6 +67,7 @@ class Flag(Enum):
65
67
def __invert__ (self : _T ) -> _T : ...
66
68
67
69
class IntFlag (int , Flag ):
70
+ def __new__ (cls : Type [_T ], value : Union [int , _T ]) -> _T : ...
68
71
def __or__ (self : _T , other : Union [int , _T ]) -> _T : ...
69
72
def __and__ (self : _T , other : Union [int , _T ]) -> _T : ...
70
73
def __xor__ (self : _T , other : Union [int , _T ]) -> _T : ...
You can’t perform that action at this time.
0 commit comments