summaryrefslogtreecommitdiff
path: root/sphinx/pycode/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/pycode/parser.py')
-rw-r--r--sphinx/pycode/parser.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py
index 28da09c78..f9644c38e 100644
--- a/sphinx/pycode/parser.py
+++ b/sphinx/pycode/parser.py
@@ -343,6 +343,7 @@ class VariableCommentPicker(ast.NodeVisitor):
self.current_classes.append(node.name)
self.add_entry(node.name)
self.context.append(node.name)
+ self.previous = node
for child in node.body:
self.visit(child)
self.context.pop()