Skip to content

Commit bdea1bb

Browse files
fix third_party/2/enum.pyi (#2039)
This fixes an error in Travis that seems to have been caused by python/mypy#4319. The fix was taken from the stdlib/3.4/enum.pyi stub. Mypy no longer assumes that classes whose metaclass is EnumMeta are subclasses of Enum, so we can't bound the typevar on Enum.
1 parent e2cfc4b commit bdea1bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third_party/2/enum.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import List, Any, TypeVar, Union, Iterable, Iterator, TypeVar, Generic, Type, Sized, Reversible, Container, Mapping
22
from abc import ABCMeta
33

4-
_T = TypeVar('_T', bound=Enum)
4+
_T = TypeVar('_T')
55
_S = TypeVar('_S', bound=Type[Enum])
66

77
# Note: EnumMeta actually subclasses type directly, not ABCMeta.

0 commit comments

Comments
 (0)