mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
bpo-44926: get_type_hints: Add note about type aliases with forward refs (GH-27859) (GH-27860)
(cherry picked from commit 16b9be4861)
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
This commit is contained in:
parent
d63114caf9
commit
9ffe582a01
1 changed files with 7 additions and 0 deletions
|
|
@ -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`.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue