]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-98500: Fix typing docs for `*View` classes (#98511)
authorNikita Sobolev <mail@sobolevn.me>
Mon, 24 Oct 2022 17:47:32 +0000 (20:47 +0300)
committerGitHub <noreply@github.com>
Mon, 24 Oct 2022 17:47:32 +0000 (10:47 -0700)
Doc/library/typing.rst

index ae7e223069962e878a4a00d9c4c98a5b4b1551ba..53690ec7f60aa01cb7855d30747919b334efcd9b 100644 (file)
@@ -2096,7 +2096,7 @@ Corresponding to collections in :mod:`collections.abc`
       :class:`collections.abc.Container` now supports ``[]``. See :pep:`585`
       and :ref:`types-genericalias`.
 
-.. class:: ItemsView(MappingView, Generic[KT_co, VT_co])
+.. class:: ItemsView(MappingView, AbstractSet[tuple[KT_co, VT_co]])
 
    A generic version of :class:`collections.abc.ItemsView`.
 
@@ -2104,7 +2104,7 @@ Corresponding to collections in :mod:`collections.abc`
       :class:`collections.abc.ItemsView` now supports ``[]``. See :pep:`585`
       and :ref:`types-genericalias`.
 
-.. class:: KeysView(MappingView[KT_co], AbstractSet[KT_co])
+.. class:: KeysView(MappingView, AbstractSet[KT_co])
 
    A generic version of :class:`collections.abc.KeysView`.
 
@@ -2124,7 +2124,7 @@ Corresponding to collections in :mod:`collections.abc`
       :class:`collections.abc.Mapping` now supports ``[]``. See :pep:`585`
       and :ref:`types-genericalias`.
 
-.. class:: MappingView(Sized, Iterable[T_co])
+.. class:: MappingView(Sized)
 
    A generic version of :class:`collections.abc.MappingView`.
 
@@ -2164,7 +2164,7 @@ Corresponding to collections in :mod:`collections.abc`
       :class:`collections.abc.Sequence` now supports ``[]``. See :pep:`585`
       and :ref:`types-genericalias`.
 
-.. class:: ValuesView(MappingView[VT_co])
+.. class:: ValuesView(MappingView, Collection[_VT_co])
 
    A generic version of :class:`collections.abc.ValuesView`.