From a752f58d6b628ab4fe6e4263137ec4cc244ff390 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Mon, 20 Oct 2025 21:09:33 +0100 Subject: [PATCH] [Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints() (#139565) Co-authored-by: Jelle Zijlstra --- Doc/library/typing.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 41f22aa72cdf..e5d116c702ea 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -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). -- 2.47.3