Skip to content

Commit d9abd8a

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 3f6cfc5 commit d9abd8a

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
@@ -2096,15 +2096,15 @@ Corresponding to collections in :mod:`collections.abc`
20962096
:class:`collections.abc.Container` now supports ``[]``. See :pep:`585`
20972097
and :ref:`types-genericalias`.
20982098

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

21012101
A generic version of :class:`collections.abc.ItemsView`.
21022102

21032103
.. deprecated:: 3.9
21042104
:class:`collections.abc.ItemsView` now supports ``[]``. See :pep:`585`
21052105
and :ref:`types-genericalias`.
21062106

2107-
.. class:: KeysView(MappingView[KT_co], AbstractSet[KT_co])
2107+
.. class:: KeysView(MappingView, AbstractSet[KT_co])
21082108

21092109
A generic version of :class:`collections.abc.KeysView`.
21102110

@@ -2124,7 +2124,7 @@ Corresponding to collections in :mod:`collections.abc`
21242124
:class:`collections.abc.Mapping` now supports ``[]``. See :pep:`585`
21252125
and :ref:`types-genericalias`.
21262126

2127-
.. class:: MappingView(Sized, Iterable[T_co])
2127+
.. class:: MappingView(Sized)
21282128

21292129
A generic version of :class:`collections.abc.MappingView`.
21302130

@@ -2164,7 +2164,7 @@ Corresponding to collections in :mod:`collections.abc`
21642164
:class:`collections.abc.Sequence` now supports ``[]``. See :pep:`585`
21652165
and :ref:`types-genericalias`.
21662166

2167-
.. class:: ValuesView(MappingView[VT_co])
2167+
.. class:: ValuesView(MappingView, Collection[_VT_co])
21682168

21692169
A generic version of :class:`collections.abc.ValuesView`.
21702170

0 commit comments

Comments
 (0)