Skip to content
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

Use a separate type variable for unique() #1138

Merged
merged 2 commits into from
Apr 5, 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
3 changes: 2 additions & 1 deletion stdlib/3.4/enum.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import sys
from typing import List, Any, TypeVar, Union, Iterable, Iterator, TypeVar, Generic, Type

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

class EnumMeta(type, Iterable[Enum]):
def __iter__(self: Type[_T]) -> Iterator[_T]: ... # type: ignore
Expand All @@ -21,7 +22,7 @@ class Enum(metaclass=EnumMeta):
class IntEnum(int, Enum):
value = ... # type: int

def unique(enumeration: _T) -> _T: ...
def unique(enumeration: _S) -> _S: ...

if sys.version_info >= (3, 6):
_auto_null = ... # type: Any
Expand Down