Avoid over-constraining selftype of EnumMeta (#1770)

This is needed for python/mypy#4311, and is sound.
This commit is contained in:
Elazar Gershuni
2017-12-04 21:21:57 +02:00
committed by Guido van Rossum
parent fc10a94db1
commit 97fb265a4c

View File

@@ -2,7 +2,7 @@ import sys
from typing import List, Any, TypeVar, Union, Iterable, Iterator, TypeVar, Generic, Type, Sized, Reversible, Container, Mapping
from abc import ABCMeta
_T = TypeVar('_T', bound=Enum)
_T = TypeVar('_T')
_S = TypeVar('_S', bound=Type[Enum])
# Note: EnumMeta actually subclasses type directly, not ABCMeta.