From b7530cc79e9f370b07dfae33d5eed30ee507e1fa Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sun, 5 Jan 2020 06:11:38 -0800 Subject: [PATCH] Add __init__ for subclasses of MappingView in python2 (#3570) Resolves #3549 for python2 --- stdlib/2/typing.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/2/typing.pyi b/stdlib/2/typing.pyi index 45eb2e49d..db7c77a2e 100644 --- a/stdlib/2/typing.pyi +++ b/stdlib/2/typing.pyi @@ -231,14 +231,17 @@ class MappingView(object): def __len__(self) -> int: ... class ItemsView(MappingView, AbstractSet[Tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]): + def __init__(self, mapping: Mapping[_KT_co, _VT_co]) -> None: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ... class KeysView(MappingView, AbstractSet[_KT_co], Generic[_KT_co]): + def __init__(self, mapping: Mapping[_KT_co, _VT_co]) -> None: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_KT_co]: ... class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]): + def __init__(self, mapping: Mapping[_KT_co, _VT_co]) -> None: ... def __contains__(self, o: object) -> bool: ... def __iter__(self) -> Iterator[_VT_co]: ...