Skip to content

Commit 16b9be4

Browse files
authored
bpo-44926: get_type_hints: Add note about type aliases with forward refs (#27859)
1 parent f5d7a8d commit 16b9be4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Doc/library/typing.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,6 +2013,13 @@ Introspection helpers
20132013
'name': Annotated[str, 'some marker']
20142014
}
20152015

2016+
.. note::
2017+
2018+
:func:`get_type_hints` does not work with imported
2019+
:ref:`type aliases <type-aliases>` that include forward references.
2020+
Enabling postponed evaluation of annotations (:pep:`563`) may remove
2021+
the need for most forward references.
2022+
20162023
.. versionchanged:: 3.9
20172024
Added ``include_extras`` parameter as part of :pep:`593`.
20182025

0 commit comments

Comments
 (0)