May 3, 2020
12:15 a.m.
Filipe Laíns <filipe.lains@gmail.com> added the comment: typing.get_type_hints can be used for this, it resolves the annotation string.
def foo(bar: 'int') -> 'bool': pass ... typing.get_type_hints(foo) {'bar': <class 'int'>, 'return': <class 'bool'>}
---------- nosy: +FFY00 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39990> _______________________________________