From a21c528465521e027d1a9af2424172753c2a7098 Mon Sep 17 00:00:00 2001 From: ilan-gold Date: Thu, 11 Jul 2024 15:28:24 +0200 Subject: [PATCH] (fix): ignore warning --- src/scanpydoc/rtd_github_links/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scanpydoc/rtd_github_links/__init__.py b/src/scanpydoc/rtd_github_links/__init__.py index 98920a2..71f7f21 100644 --- a/src/scanpydoc/rtd_github_links/__init__.py +++ b/src/scanpydoc/rtd_github_links/__init__.py @@ -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) :])