Skip to content

Commit

Permalink
fix: Fix target path computation: use qualified names to maintain cla…
Browse files Browse the repository at this point in the history
…sses in the path

Issue-296: #296
  • Loading branch information
pawamoy committed Jun 26, 2024
1 parent ce186a4 commit 6e17def
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/griffe/agents/nodes/_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def alias_target_path(self) -> str | None:
child_module_path = child_module_path.lstrip("_")
if self.is_module:
return child_module_path
child_name = getattr(self.obj, "__name__", self.name)
child_name = getattr(self.obj, "__qualname__", self.path[len(self.module.path) + 1 :])
return f"{child_module_path}.{child_name}"


Expand Down

0 comments on commit 6e17def

Please sign in to comment.