From 8bfbf83010fdd5b45d670a159df3c11b2b58e877 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Thu, 27 Aug 2026 17:35:49 -0700 Subject: [PATCH] Fix truthy-bool checks for fixed width integers Fixes #21898 --- mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi b/mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi index 7f7b9a89d8c53..2446244df46f3 100644 --- a/mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi +++ b/mypy/typeshed/stubs/mypy-extensions/mypy_extensions.pyi @@ -112,6 +112,7 @@ class i64: def __gt__(self, x: i64) -> bool: ... def __index__(self) -> int: ... def __eq__(self, x: object) -> bool: ... + def __bool__(self) -> bool: ... class i32: @overload @@ -148,6 +149,7 @@ class i32: def __gt__(self, x: i32) -> bool: ... def __index__(self) -> int: ... def __eq__(self, x: object) -> bool: ... + def __bool__(self) -> bool: ... class i16: @overload @@ -184,6 +186,7 @@ class i16: def __gt__(self, x: i16) -> bool: ... def __index__(self) -> int: ... def __eq__(self, x: object) -> bool: ... + def __bool__(self) -> bool: ... class u8: @overload @@ -220,3 +223,4 @@ class u8: def __gt__(self, x: u8) -> bool: ... def __index__(self) -> int: ... def __eq__(self, x: object) -> bool: ... + def __bool__(self) -> bool: ...