Merge pull request #10353 from tk0miya/10305_optional_forwardref_annotations

Fix #10305: autodoc: Failed to extract optional forwardrefs
This commit is contained in:
Takeshi KOMIYA
2022-05-03 02:03:28 +09:00
committed by GitHub
5 changed files with 37 additions and 2 deletions

View File

@@ -1150,6 +1150,13 @@ def test_autodoc_type_aliases(app):
'',
' docstring',
'',
'',
'.. py:data:: variable3',
' :module: target.autodoc_type_aliases',
' :type: Optional[int]',
'',
' docstring',
'',
]
# define aliases
@@ -1214,6 +1221,13 @@ def test_autodoc_type_aliases(app):
'',
' docstring',
'',
'',
'.. py:data:: variable3',
' :module: target.autodoc_type_aliases',
' :type: Optional[myint]',
'',
' docstring',
'',
]