]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints() ...
authorSam Bull <git@sambull.org>
Mon, 20 Oct 2025 20:09:33 +0000 (21:09 +0100)
committerGitHub <noreply@github.com>
Mon, 20 Oct 2025 20:09:33 +0000 (20:09 +0000)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Doc/library/typing.rst

index 41f22aa72cdfaf03d86b1917c0beaa072562ab11..e5d116c702ea2eddfe610f0b2c1af56a3389fa46 100644 (file)
@@ -3354,7 +3354,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).