mirror of
https://github.com/python/cpython.git
synced 2025-08-05 01:18:26 +00:00

This fixes TypedDict to work with get_type_hints and postponed evaluation of annotations across modules.
This is done by adding the module name to ForwardRef at the time the object is created and using that to resolve the globals during the evaluation.
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 889036f7ef
)
Co-authored-by: Germán Méndez Bravo <german.mb@gmail.com>
2 lines
117 B
ReStructuredText
2 lines
117 B
ReStructuredText
Fixes ``TypedDict`` to work with ``typing.get_type_hints()`` and postponed evaluation of
|
|
annotations across modules.
|