March 17, 2020
2:19 p.m.
Nguyễn Gia Phong <mcsinyx@disroot.org> added the comment: I traced it down to inspect.formatannotation(annotation). Before checking for isinstance(annotation, type), IMHO we should do something like import typing if isinstance(annotation, str): annotation = typing.ForwardRef(str)._evaluate(annotation) However, is is not aware of globals and especially locals of help caller, so I guess more sophisticated solution is required. ---------- title: help output should make use of typing.get_type_hints -> help should evaluate forward reference _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39990> _______________________________________