Open xuhdev opened 3 years ago
Hey @xuhdev ! Thanks a lot for reporting this issue. I think that this should rather be resolved within the autosummary extension, shouldn't it? I saw that you already created the corresponding issue in the sphinx repo, so maybe we keep this issue here open and close it when https://github.com/sphinx-doc/sphinx/issues/8645 has been resolved
Hi @Chilipp ! I'm not sure whether the two issues are actually the same issue: https://github.com/sphinx-doc/sphinx/issues/8645 doesn't involve imported module, but this issue is only reproduceable if an imported module is involved. But they may be related though, I just don't understand the extension enough to make the judgment.
Consider a class that has an attribute without a default value, and is imported. If
autoclass
is applied to this class andautosummary
is turned on,sphinx-build
errors out.Reproduce
Download bug.tar.gz. Unarchive it, and run
It produces an error:
Content of
bug.tar.gz
:_impl.py
:__init__.py
:conf.py
:index.rst
:Either removing
:autosummary:
or put the definition of class A to__init__.py
resolves the error.