Skip to content

Commit a752f58

Browse files
[Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints() (#139565)
Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent c6be6e4 commit a752f58

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
@@ -3354,7 +3354,8 @@ Introspection helpers
33543354
``__annotations__`` dictionaries. Annotations on classes appearing
33553355
earlier in the :term:`method resolution order` always take precedence over
33563356
annotations on classes appearing later in the method resolution order.
3357-
* The function recursively replaces all occurrences of ``Annotated[T, ...]``
3357+
* The function recursively replaces all occurrences of
3358+
``Annotated[T, ...]``, ``Required[T]``, ``NotRequired[T]``, and ``ReadOnly[T]``
33583359
with ``T``, unless *include_extras* is set to ``True`` (see
33593360
:class:`Annotated` for more information).
33603361

0 commit comments

Comments
 (0)