We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f0d9e6 commit fa01ac0Copy full SHA for fa01ac0
1 file changed
src/griffe/_internal/agents/visitor.py
@@ -613,6 +613,7 @@ def handle_attribute(
613
self.extensions.call("on_attribute_node", node=node, agent=self)
614
parent = self.current
615
labels = set()
616
+ names = None
617
618
if parent.kind is Kind.MODULE:
619
try:
@@ -645,7 +646,9 @@ def handle_attribute(
645
646
names = get_instance_names(node)
647
except KeyError: # Unsupported nodes, like subscript.
648
return
- parent = parent.parent # type: ignore[assignment]
649
+ parent = parent.parent
650
+ if parent is None:
651
+ return
652
labels.add("instance-attribute")
653
654
if not names:
0 commit comments