Fix base class compatibility for IntFlag in Python 3.11+ to resolve inverted type issue (#13854)

This commit is contained in:
vidhyavijayan3
2025-04-28 17:14:40 +05:30
committed by GitHub
parent 02a9a0e848
commit 42347a1ada
+2
View File
@@ -299,6 +299,7 @@ if sys.version_info >= (3, 11):
def __or__(self, other: int) -> Self: ...
def __and__(self, other: int) -> Self: ...
def __xor__(self, other: int) -> Self: ...
def __invert__(self) -> Self: ...
__ror__ = __or__
__rand__ = __and__
__rxor__ = __xor__
@@ -309,6 +310,7 @@ else:
def __or__(self, other: int) -> Self: ...
def __and__(self, other: int) -> Self: ...
def __xor__(self, other: int) -> Self: ...
def __invert__(self) -> Self: ...
__ror__ = __or__
__rand__ = __and__
__rxor__ = __xor__