-
-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
Description of the bug
In a library with the following namespaced module structure
├── index.py
├── __init__.py
and the following content of the init
from .index import (
index,
)I get the following error when generating docs using mkdocstrings:
File "/usr/local/venv/lib/python3.11/site-packages/griffe/_internal/models.py", line 1505, in members
final_target = self.final_target
^^^^^^^^^^^^^^^^^
File "/usr/local/venv/lib/python3.11/site-packages/griffe/_internal/models.py", line 2104, in final_target
target = target.target # type: ignore[assignment]
^^^^^^^^^^^^^
File "/usr/local/venv/lib/python3.11/site-packages/griffe/_internal/models.py", line 2069, in target
self.resolve_target()
File "/usr/local/venv/lib/python3.11/site-packages/griffe/_internal/models.py", line 2133, in resolve_target
raise CyclicAliasError([self.target_path])
griffe._internal.exceptions.CyclicAliasError: Cyclic aliases detected:
my_library.index.indexExpected behavior
Of course one can argue that simply renaming the module or the function imported from the module avoids this issue. However, this is valid and idiomatic python and I would have expected that the api reference generation works.
Metadata
Metadata
Assignees
Labels
No labels