Filipe Laíns <filipe.la...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue39990>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to