]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] [Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 20 Oct 2025 20:23:28 +0000 (22:23 +0200)
committerGitHub <noreply@github.com>
Mon, 20 Oct 2025 20:23:28 +0000 (13:23 -0700)
[Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints() (GH-139565)
(cherry picked from commit a752f58d6b628ab4fe6e4263137ec4cc244ff390)

Co-authored-by: Sam Bull <git@sambull.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Doc/library/typing.rst

index 05444690cd01fdf284fa5c7dc76d7f5c7646c7aa..febabb5bb6d031511caa4d0285d75432ff5f26e2 100644 (file)
@@ -3240,7 +3240,8 @@ Introspection helpers
      ``__annotations__`` dictionaries. Annotations on classes appearing
      earlier in the :term:`method resolution order` always take precedence over
      annotations on classes appearing later in the method resolution order.
-   * The function recursively replaces all occurrences of ``Annotated[T, ...]``
+   * The function recursively replaces all occurrences of
+     ``Annotated[T, ...]``, ``Required[T]``, ``NotRequired[T]``, and ``ReadOnly[T]``
      with ``T``, unless *include_extras* is set to ``True`` (see
      :class:`Annotated` for more information).