Skip to content

Commit c2944c4

Browse files
authored
Fix Enum containment operand types on Python 3.10 and 3.11 (#16300)
1 parent 6b7f7b9 commit c2944c4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

stdlib/enum.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ class EnumMeta(type):
116116
if sys.version_info >= (3, 12):
117117
def __contains__(self: type[Any], value: object) -> bool: ...
118118
elif sys.version_info >= (3, 11):
119-
def __contains__(self: type[Any], member: object) -> bool: ...
119+
def __contains__(self: type[Any], member: Enum) -> bool: ...
120120
else:
121-
def __contains__(self: type[Any], obj: object) -> bool: ...
121+
def __contains__(self: type[Any], obj: Enum) -> bool: ...
122122

123123
def __getitem__(self: type[_EnumMemberT], name: str) -> _EnumMemberT: ...
124124
@_builtins_property

0 commit comments

Comments
 (0)