From 97fb265a4c80812c3205a953f3201fc909c43a44 Mon Sep 17 00:00:00 2001 From: Elazar Gershuni Date: Mon, 4 Dec 2017 21:21:57 +0200 Subject: [PATCH] Avoid over-constraining selftype of EnumMeta (#1770) This is needed for python/mypy#4311, and is sound. --- stdlib/3.4/enum.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/3.4/enum.pyi b/stdlib/3.4/enum.pyi index 1501be274..001f6e9f7 100644 --- a/stdlib/3.4/enum.pyi +++ b/stdlib/3.4/enum.pyi @@ -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.