Skip to content

Commit b44f182

Browse files
committed
idk why you'd do this tbh
1 parent 1e12499 commit b44f182

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/builtins.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,10 @@ class bool(int):
980980
def __new__(cls, o: _Falsy = False, /) -> Literal[False]: ...
981981
@overload
982982
def __new__(cls, o: object, /) -> Self: ...
983+
@overload
984+
def __bool__(self: Literal[True]) -> Literal[True]: ...
985+
@overload
986+
def __bool__(self: Literal[False]) -> Literal[False]: ...
983987
# The following overloads could be represented more elegantly with a TypeVar("_B", bool, int),
984988
# however mypy has a bug regarding TypeVar constraints (https://github.com/python/mypy/issues/11880).
985989
@overload

0 commit comments

Comments
 (0)