Skip to content

Commit 3268b35

Browse files
authored
Fix module-less qualname_overrides (#195)
1 parent e07fb09 commit 3268b35

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/scanpydoc/elegant_typehints/_autodoc_patch.py

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ def add_directive_header(self: ClassDocumenter, sig: str) -> None:
3232
)
3333
# But maybe in the future it will
3434
lines.replace(f":{role}:`{old_name}`", f":{role}:`{new_name}`")
35+
if any("." not in name for name in (old_name, new_name)):
36+
continue # pragma: no cover
3537
old_mod, old_cls = old_name.rsplit(".", 1)
3638
new_mod, new_cls = new_name.rsplit(".", 1)
3739
replace_multi_suffix(

0 commit comments

Comments
 (0)