Skip to content

Commit

Permalink
Add EnumMeta.__prepare__ (#7243)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Feb 20, 2022
1 parent 8130e40 commit 953f815
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions stdlib/enum.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ class EnumMeta(ABCMeta):
else:
def __new__(metacls: type[Self], cls: str, bases: tuple[type, ...], classdict: _EnumDict) -> Self: ... # type: ignore

if sys.version_info >= (3, 9):
@classmethod
def __prepare__(metacls, cls: str, bases: tuple[type, ...], **kwds: Any) -> _EnumDict: ... # type: ignore[override]
else:
@classmethod
def __prepare__(metacls, cls: str, bases: tuple[type, ...]) -> _EnumDict: ... # type: ignore[override]

def __iter__(self: type[_T]) -> Iterator[_T]: ...
def __reversed__(self: type[_T]) -> Iterator[_T]: ...
def __contains__(self: type[Any], member: object) -> bool: ...
Expand Down

0 comments on commit 953f815

Please sign in to comment.