Skip to content

Commit

Permalink
Fix module-less qualname_overrides (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Jan 27, 2025
1 parent e07fb09 commit 3268b35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scanpydoc/elegant_typehints/_autodoc_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def add_directive_header(self: ClassDocumenter, sig: str) -> None:
)
# But maybe in the future it will
lines.replace(f":{role}:`{old_name}`", f":{role}:`{new_name}`")
if any("." not in name for name in (old_name, new_name)):
continue # pragma: no cover
old_mod, old_cls = old_name.rsplit(".", 1)
new_mod, new_cls = new_name.rsplit(".", 1)
replace_multi_suffix(
Expand Down

0 comments on commit 3268b35

Please sign in to comment.