This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients cjw296, gvanrossum, levkivskyi
Date 2020-09-27.19:59:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1601236748.27.0.308802866894.issue41872@roundup.psfhosted.org>
In-reply-to
Content
This cannot be helped (unless we were to add an ugly sys._getframe() call to get_type_hints(), which I don't want to do). The solution is to pass `localns=locals()`, e.g.

get_type_hints(foo, None, locals())

or

get_type_hints(foo, localns=locals())
History
Date User Action Args
2020-09-27 19:59:08gvanrossumsetrecipients: + gvanrossum, cjw296, levkivskyi
2020-09-27 19:59:08gvanrossumsetmessageid: <1601236748.27.0.308802866894.issue41872@roundup.psfhosted.org>
2020-09-27 19:59:08gvanrossumlinkissue41872 messages
2020-09-27 19:59:08gvanrossumcreate