Chilipp / autodocsumm

Extending your autodoc API docs with a summary
Apache License 2.0
49 stars 14 forks source link

Since Sphinx 8 autoclasssumm fails with import_cycle for special __init__ #102

Open raymanP opened 2 months ago

raymanP commented 2 months ago

Hi there! Having file __init__.py:

from .myclass import myclass

and file myclass.py:

class myclass():
  def test(self):
    return 3

This Sphinx code fails:

.. currentmodule:: myclass.myclass

.. autoclass:: myclass.myclass

.. autoclasssumm:: myclass
    :autosummary-no-titles:
    :autosummary-nosignatures:
    :autosummary-members: test

fails with WARNING: Summarised items should not include the current module. Replace 'myclass.myclass.test with 'myclass.test. [autosummary.import_cycle]

Please, someone has any solutions?

Chilipp commented 1 month ago

hey @raymanP! my apologies for the delay. Isn't this a duplicate of your previous issue #65?

raymanP commented 1 month ago

hey @Chilipp , thank you for answering! I'm not sure, #65 was before Sphinx 8 leading to the missing links, but creating the docs. With Sphinx 8 the doc is not created due to the raised exception above. Could be that the root cause is the same...