From a77613fcfaf1323a46ba5645cc5569da7457d2fa Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 13 Apr 2019 23:08:52 +0900 Subject: pycode: Support "async" syntax --- sphinx/pycode/parser.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sphinx/pycode/parser.py') diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py index bf80f4367..9f9f7dd29 100644 --- a/sphinx/pycode/parser.py +++ b/sphinx/pycode/parser.py @@ -381,6 +381,10 @@ class VariableCommentPicker(ast.NodeVisitor): self.context.pop() self.current_function = None + def visit_AsyncFunctionDef(self, node): + # type: (ast.AsyncFunctionDef) -> None + self.visit_FunctionDef(node) # type: ignore + class DefinitionFinder(TokenProcessor): def __init__(self, lines): -- cgit v1.2.1