Open smite opened 3 years ago
I am having this exact same issue. Does anyone have a workaround for this problem, or any ideas for a patch that could resolve it?
Also found this issue.
Same issue
Does anyone have a stopgap solution for this? I saw mention of placing automodule
before autosummary
in #9069, however I don't think that is working for me.
The workaround that worked for me was to define __all__ = [modules, of, aaa]
inside of what for this example would be src/aaa/__init__.py
, so that autosummary does not attempt to search for all modules and functions, and instead just looks at __all__
.
Describe the bug
Recursive
autosummary
produces broken documentation and emits aWARNING: autosummary: stub file not found
message when a module contains a reference to itself.To Reproduce
Assume a Python project with the following structure:
Both
__init__.py
files contain just a module docstring.conf.py
:index.rst
Running
sphinx-build
for the above setup produces correct API docs.However, if you add the line
to
src/aaa/__init__.py
, Sphinx gives the warningand fails to link
aaa
toaaa.bbb
:Expected behavior Docs should be produced exactly as before, without warnings.
Environment info