mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add __nonzero__ to numeric builtin types
This commit is contained in:
committed by
Łukasz Langa
parent
5d1a162db9
commit
db09b441ce
@@ -119,6 +119,7 @@ class int(SupportsInt, SupportsFloat, SupportsAbs[int]):
|
||||
def __int__(self) -> int: ...
|
||||
def __abs__(self) -> int: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __nonzero__(self) -> bool: ...
|
||||
|
||||
class float(SupportsFloat, SupportsInt, SupportsAbs[float]):
|
||||
@overload
|
||||
@@ -166,6 +167,7 @@ class float(SupportsFloat, SupportsInt, SupportsAbs[float]):
|
||||
def __float__(self) -> float: ...
|
||||
def __abs__(self) -> float: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __nonzero__(self) -> bool: ...
|
||||
|
||||
class complex(SupportsAbs[float]):
|
||||
@overload
|
||||
@@ -201,6 +203,7 @@ class complex(SupportsAbs[float]):
|
||||
def __str__(self) -> str: ...
|
||||
def __abs__(self) -> float: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __nonzero__(self) -> bool: ...
|
||||
|
||||
class basestring(metaclass=ABCMeta): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user