Add __nonzero__ to numeric builtin types

This commit is contained in:
Alex Frieder
2017-01-20 15:33:59 -05:00
committed by Łukasz Langa
parent 5d1a162db9
commit db09b441ce

View File

@@ -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): ...