Skip to content

Add missing enum attributes #1195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions stdlib/3.4/enum.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import sys
from typing import List, Any, TypeVar, Union, Iterable, Iterator, TypeVar, Generic, Type, Sized
from typing import List, Any, TypeVar, Union, Iterable, Iterator, TypeVar, Generic, Type, Sized, Reversible, Container, Mapping

_T = TypeVar('_T', bound=Enum)
_S = TypeVar('_S', bound=Type[Enum])

class EnumMeta(type, Iterable[Enum], Sized):
class EnumMeta(type, Iterable[Enum], Sized, Reversible[Enum], Container[Enum]):
def __iter__(self: Type[_T]) -> Iterator[_T]: ... # type: ignore
def __reversed__(self: Type[_T]) -> Iterator[_T]: ...
def __contains__(self, member: Any) -> bool: ...
def __getitem__(self: Type[_T], name: str) -> _T: ...
@property
def __members__(self: Type[_T]) -> Mapping[str, _T]: ...

class Enum(metaclass=EnumMeta):
def __new__(cls: Type[_T], value: Any) -> _T: ...
Expand Down