Skip to content

Commit 626b5fd

Browse files
DreamsorcererJelleZijlstra
authored andcommitted
[Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints() (GH-139565)
(cherry picked from commit a752f58) Co-authored-by: Sam Bull <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent d7473f7 commit 626b5fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/typing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3240,7 +3240,8 @@ Introspection helpers
32403240
``__annotations__`` dictionaries. Annotations on classes appearing
32413241
earlier in the :term:`method resolution order` always take precedence over
32423242
annotations on classes appearing later in the method resolution order.
3243-
* The function recursively replaces all occurrences of ``Annotated[T, ...]``
3243+
* The function recursively replaces all occurrences of
3244+
``Annotated[T, ...]``, ``Required[T]``, ``NotRequired[T]``, and ``ReadOnly[T]``
32443245
with ``T``, unless *include_extras* is set to ``True`` (see
32453246
:class:`Annotated` for more information).
32463247

0 commit comments

Comments
 (0)