From b46280ec78bfb902644f22e7930d8eec5c62dccb Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 13 Dec 2016 11:40:18 -0800 Subject: [PATCH] Make FrozenSet covariant. (#769) Follow-up for PR #726. --- stdlib/2/typing.pyi | 2 +- stdlib/3/typing.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2/typing.pyi b/stdlib/2/typing.pyi index 1be59a352..73b1a435e 100644 --- a/stdlib/2/typing.pyi +++ b/stdlib/2/typing.pyi @@ -143,7 +143,7 @@ class AbstractSet(Sized, Iterable[_T_co], Container[_T_co], Generic[_T_co]): # TODO: argument can be any container? def isdisjoint(self, s: AbstractSet[Any]) -> bool: ... -class FrozenSet(AbstractSet[_T], Generic[_T]): ... +class FrozenSet(AbstractSet[_T_co], Generic[_T_co]): ... class MutableSet(AbstractSet[_T], Generic[_T]): @abstractmethod diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index fc553f99a..4c79c3507 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -210,7 +210,7 @@ class AbstractSet(Iterable[_T_co], Container[_T_co], Sized, Generic[_T_co]): # TODO: Argument can be a more general ABC? def isdisjoint(self, s: AbstractSet[Any]) -> bool: ... -class FrozenSet(AbstractSet[_T], Generic[_T]): ... +class FrozenSet(AbstractSet[_T_co], Generic[_T_co]): ... class MutableSet(AbstractSet[_T], Generic[_T]): @abstractmethod