Fix #8099: autodoc: NameError is raised when script uses TYPE_CHECKING

`typing.get_type_hints()` raises NameError when the target object
contains unresolavable type annotation (ex. TYPE_CHECKING).  This
handles the exception and use unresolved annotations for type hints.
This commit is contained in:
Takeshi KOMIYA
2020-08-13 00:05:27 +09:00
parent 99e36398fc
commit 611fff975e
4 changed files with 37 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ Bugs fixed
class
* #8091: autodoc: AttributeError is raised on documenting an attribute on Python
3.5.2
* #8099: autodoc: NameError is raised when target code uses ``TYPE_CHECKING``
Testing
--------