Skip to content

Commit

Permalink
(fix): ignore warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan-gold committed Jul 11, 2024
1 parent 9bbcc02 commit a21c528
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scanpydoc/rtd_github_links/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def _module_path(obj: _SourceObjectType, module: ModuleType) -> PurePosixPath:
try:
file = Path(inspect.getabsfile(obj))
except TypeError:
file = Path(module.__file__ if hasattr(module, "__file__") else "")
file = Path(module.__file__ if hasattr(module, "__file__") else "") # type: ignore
offset = -1 if file.name == "__init__.py" else 0
parts = module.__name__.split(".")
return PurePosixPath(*file.parts[offset - len(parts) :])
Expand Down

0 comments on commit a21c528

Please sign in to comment.