Skip to content

Commit 42347a1

Browse files
Fix base class compatibility for IntFlag in Python 3.11+ to resolve inverted type issue (#13854)
1 parent 02a9a0e commit 42347a1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

stdlib/enum.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ if sys.version_info >= (3, 11):
299299
def __or__(self, other: int) -> Self: ...
300300
def __and__(self, other: int) -> Self: ...
301301
def __xor__(self, other: int) -> Self: ...
302+
def __invert__(self) -> Self: ...
302303
__ror__ = __or__
303304
__rand__ = __and__
304305
__rxor__ = __xor__
@@ -309,6 +310,7 @@ else:
309310
def __or__(self, other: int) -> Self: ...
310311
def __and__(self, other: int) -> Self: ...
311312
def __xor__(self, other: int) -> Self: ...
313+
def __invert__(self) -> Self: ...
312314
__ror__ = __or__
313315
__rand__ = __and__
314316
__rxor__ = __xor__

0 commit comments

Comments
 (0)