Fix #7461: autodoc: empty tuple in type annotation is not shown correctly

This commit is contained in:
Takeshi KOMIYA
2020-04-12 13:00:04 +09:00
parent 2e219366c4
commit c8355234eb
3 changed files with 6 additions and 1 deletions

View File

@@ -54,6 +54,7 @@ from sphinx.pycode import ast
("- 1", "- 1"), # UnaryOp
("- a", "- a"), # USub
("(1, 2, 3)", "1, 2, 3"), # Tuple
("()", "()"), # Tuple (empty)
])
def test_unparse(source, expected):
module = ast.parse(source)