Add __bool__ to numeric builtin types

This commit is contained in:
Alex Frieder authored and Łukasz Langa committed 2017-01-20 12:41:16 -08:00
1 parent db09b441ce
commit cf98162fca
1 file changed
+3
+3
View File
@@ -120,6 +120,7 @@ class int(SupportsInt, SupportsFloat, SupportsAbs[int]):
def __int__(self) -> int: return self
def __abs__(self) -> int: ...
def __hash__(self) -> int: ...
def __bool__(self) -> bool: ...
class float(SupportsFloat, SupportsInt, SupportsAbs[float]):
def __init__(self, x: Union[SupportsFloat, str, bytes] = ...) -> None: ...
@@ -158,6 +159,7 @@ class float(SupportsFloat, SupportsInt, SupportsAbs[float]):
def __float__(self) -> float: ...
def __abs__(self) -> float: ...
def __hash__(self) -> int: ...
def __bool__(self) -> bool: ...
class complex(SupportsAbs[float]):
@overload
@@ -191,6 +193,7 @@ class complex(SupportsAbs[float]):
def __str__(self) -> str: ...
def __abs__(self) -> float: ...
def __hash__(self) -> int: ...
def __bool__(self) -> bool: ...
class str(Sequence[str]):
@overload