Nguyễn Gia Phong <mcsi...@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 <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