From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 20 Oct 2025 20:23:19 +0000 (+0200) Subject: [3.14] [Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba6d956eb98bea2eaff245d8da092a0a95060d97;p=thirdparty%2FPython%2Fcpython.git [3.14] [Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints() (GH-139565) (#140386) [Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints() (GH-139565) (cherry picked from commit a752f58d6b628ab4fe6e4263137ec4cc244ff390) Co-authored-by: Sam Bull --- diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index b4364c371b2d..862f765b148c 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -3360,7 +3360,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).