From 327ae91627622522f4f5525b19f2a90210821729 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Fri, 21 Oct 2022 19:47:44 +0300 Subject: [PATCH] `ValuesView` is a `Collection`, not `Iterable` (#8953) See https://github.com/python/cpython/issues/98500 and https://github.com/python/cpython/blob/49f61068f49747164988ffc5a442d2a63874fc17/Lib/_collections_abc.py#L893 --- stdlib/typing.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/typing.pyi b/stdlib/typing.pyi index 53bfccd74..d17a9d08f 100644 --- a/stdlib/typing.pyi +++ b/stdlib/typing.pyi @@ -566,7 +566,7 @@ class KeysView(MappingView, AbstractSet[_KT_co], Generic[_KT_co]): def __xor__(self, other: Iterable[_T]) -> set[_KT_co | _T]: ... def __rxor__(self, other: Iterable[_T]) -> set[_KT_co | _T]: ... -class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]): +class ValuesView(MappingView, Collection[_VT_co], Generic[_VT_co]): def __init__(self, mapping: Mapping[Any, _VT_co]) -> None: ... # undocumented def __contains__(self, value: object) -> bool: ... def __iter__(self) -> Iterator[_VT_co]: ...