Skip to content

Commit

Permalink
bpo-44926: get_type_hints: Add note about type aliases with forward…
Browse files Browse the repository at this point in the history
… refs (#27859)
  • Loading branch information
mhils authored Aug 20, 2021
1 parent f5d7a8d commit 16b9be4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2013,6 +2013,13 @@ Introspection helpers
'name': Annotated[str, 'some marker']
}

.. note::

:func:`get_type_hints` does not work with imported
:ref:`type aliases <type-aliases>` that include forward references.
Enabling postponed evaluation of annotations (:pep:`563`) may remove
the need for most forward references.

.. versionchanged:: 3.9
Added ``include_extras`` parameter as part of :pep:`593`.

Expand Down

0 comments on commit 16b9be4

Please sign in to comment.