ValuesView is a Collection, not Iterable (#8953)

See https://github.com/python/cpython/issues/98500 and 49f61068f4/Lib/_collections_abc.py (L893)
This commit is contained in:
Nikita Sobolev
2022-10-21 19:47:44 +03:00
committed by GitHub
parent 25810e1b11
commit 327ae91627

View File

@@ -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]: ...