Skip to content

Commit 1b376cd

Browse files
committed
refactor: Normalize labels for attributes
1 parent 97b12bd commit 1b376cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/_griffe/agents/inspector.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,14 +498,14 @@ def handle_attribute(self, node: ObjectNode, annotation: str | Expr | None = Non
498498
labels: set[str] = set()
499499

500500
if parent.kind is Kind.MODULE:
501-
labels.add("module")
501+
labels.add("module-attribute")
502502
elif parent.kind is Kind.CLASS:
503-
labels.add("class")
503+
labels.add("class-attribute")
504504
elif parent.kind is Kind.FUNCTION:
505505
if parent.name != "__init__":
506506
return
507507
parent = parent.parent # type: ignore[assignment]
508-
labels.add("instance")
508+
labels.add("instance-attribute")
509509

510510
try:
511511
value = repr(node.obj)

0 commit comments

Comments
 (0)