Skip to content

Commit e69509f

Browse files
gh-98500: Fix typing docs for *View classes (GH-98511)
(cherry picked from commit 1a217f9) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent f3c23fc commit e69509f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/typing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,15 +1791,15 @@ Corresponding to collections in :mod:`collections.abc`
17911791
:class:`collections.abc.Container` now supports ``[]``. See :pep:`585`
17921792
and :ref:`types-genericalias`.
17931793

1794-
.. class:: ItemsView(MappingView, Generic[KT_co, VT_co])
1794+
.. class:: ItemsView(MappingView, AbstractSet[tuple[KT_co, VT_co]])
17951795

17961796
A generic version of :class:`collections.abc.ItemsView`.
17971797

17981798
.. deprecated:: 3.9
17991799
:class:`collections.abc.ItemsView` now supports ``[]``. See :pep:`585`
18001800
and :ref:`types-genericalias`.
18011801

1802-
.. class:: KeysView(MappingView[KT_co], AbstractSet[KT_co])
1802+
.. class:: KeysView(MappingView, AbstractSet[KT_co])
18031803

18041804
A generic version of :class:`collections.abc.KeysView`.
18051805

@@ -1819,7 +1819,7 @@ Corresponding to collections in :mod:`collections.abc`
18191819
:class:`collections.abc.Mapping` now supports ``[]``. See :pep:`585`
18201820
and :ref:`types-genericalias`.
18211821

1822-
.. class:: MappingView(Sized, Iterable[T_co])
1822+
.. class:: MappingView(Sized)
18231823

18241824
A generic version of :class:`collections.abc.MappingView`.
18251825

@@ -1859,7 +1859,7 @@ Corresponding to collections in :mod:`collections.abc`
18591859
:class:`collections.abc.Sequence` now supports ``[]``. See :pep:`585`
18601860
and :ref:`types-genericalias`.
18611861

1862-
.. class:: ValuesView(MappingView[VT_co])
1862+
.. class:: ValuesView(MappingView, Collection[_VT_co])
18631863

18641864
A generic version of :class:`collections.abc.ValuesView`.
18651865

0 commit comments

Comments
 (0)