Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b974556

Browse files
authored
Fix truthy-bool checks for fixed width integers (#21900)
Fixes #21898
1 parent 8b8c91d commit b974556

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ class i64:
112112
def __gt__(self, x: i64) -> bool: ...
113113
def __index__(self) -> int: ...
114114
def __eq__(self, x: object) -> bool: ...
115+
def __bool__(self) -> bool: ...
115116

116117
class i32:
117118
@overload
@@ -148,6 +149,7 @@ class i32:
148149
def __gt__(self, x: i32) -> bool: ...
149150
def __index__(self) -> int: ...
150151
def __eq__(self, x: object) -> bool: ...
152+
def __bool__(self) -> bool: ...
151153

152154
class i16:
153155
@overload
@@ -184,6 +186,7 @@ class i16:
184186
def __gt__(self, x: i16) -> bool: ...
185187
def __index__(self) -> int: ...
186188
def __eq__(self, x: object) -> bool: ...
189+
def __bool__(self) -> bool: ...
187190

188191
class u8:
189192
@overload
@@ -220,3 +223,4 @@ class u8:
220223
def __gt__(self, x: u8) -> bool: ...
221224
def __index__(self) -> int: ...
222225
def __eq__(self, x: object) -> bool: ...
226+
def __bool__(self) -> bool: ...

0 commit comments

Comments
 (0)