bpo-44926: get_type_hints: Add note about type aliases with forward refs (#27859)

This commit is contained in:
Maximilian Hils 2021-08-20 16:36:51 +02:00 committed by GitHub
parent f5d7a8d29c
commit 16b9be4861
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`.