From 5c7397eb65fb8b35e2eb0315a1a092e75ee36a58 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 10 Apr 2018 21:14:20 -0700 Subject: [PATCH] fix third_party/2/enum.pyi 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. --- third_party/2/enum.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/2/enum.pyi b/third_party/2/enum.pyi index 2bab1a883858..6fb5960e38c8 100644 --- a/third_party/2/enum.pyi +++ b/third_party/2/enum.pyi @@ -1,7 +1,7 @@ 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.