Closed raymanP closed 2 years ago
hey @raymanP! I wonder what you get with
.. autosummary::
myclass.mymethod
Could you please try? I wonder whether this could be related to what I observed quite some time ago in https://github.com/sphinx-doc/sphinx/issues/9069
hey @Chilipp! Thank you for your fast reply! This also produces an entry without a link. I already tried all possibilities I could imagine.
Classes in the same module which are not in the __init__.py are linked correctly.
hey @raymanP! thanks for the confirmation! this is what I expected. It's an upstream issue in autosummary, https://github.com/sphinx-doc/sphinx/issues/9069. It would work, if you import from mymodule.mysubmodule import myclass as _myclass
, but unfortunately I do not have any other workaround. One would need to fix the upstream issue
Great to know.. Thank you @Chilipp! Then I will wait for the upstream fix. :)
Then we can close this here. Have a nice day ;)
Hi dears, if having an module import in __init__.py the links are missing for the class. Sphinx is showing the links correctly, .e.g. for :meth:`mymodule.myclass.mymethod` for the below example.
Example:
mymodule/__init__.py
from mymodule.mysubmodule import myclass
mymodule/mysubmodule.py
doc.rst
.. autoclasssumm:: myclass :autosummary-members: