Closed haiiliin closed 2 years ago
I don't know whether I made something wrong, but when I built the docs, the following error occurs (see more information in https://readthedocs.org/projects/autoclasstoc-test/builds/18283398/):
sphinx.ext.autosummary.ImportExceptionGroup: no module named module.to
I think it is caused by the following code-block:
.. code-block:: rst
:caption: index.rst
.. autosummary::
:toctree: path/to/directory/for/autogenerated/files
:recursive:
module.to.document
It seems that sphinx tries to parse the code block, but I can't figure out why. So I deleted this and it passed.
As for a demonstration, I published the updated docs on ReadtheDocs, the outcome of this pull request can be found in https://autoclasstoc-test.readthedocs.io/en/latest/basic_usage.html#basic_example.Example, where I include the docs of the Parent and the inherited member in the TOC of the child points to the Parent.
@kalekundert Will you please take a look at this?
Looks good to me, and thanks for the PR! Don't know why that one code block in the docs was causing issues, but I guess we'll deal with that if we have to.
@kalekundert Would do mind creating a new release for this? I want to use this feature in my project, thanks a lot.
I don't know whether I made something wrong, but when I built the docs, the following error occurs (see more information in https://readthedocs.org/projects/autoclasstoc-test/builds/18283398/):
sphinx.ext.autosummary.ImportExceptionGroup: no module named module.to
There is an issue about this in sphinx-doc/sphinx#7552.
Release made: thanks again for the PR!
Release made: thanks again for the PR!
Thanks so much!
Description
This PR attempts to address issue #14.
In order to move the inherited members to the parent class rather than putting everything in the inherited class, I use the full qualified name of the attributes inspired by https://stackoverflow.com/a/2020083/18728919.
And I append a
~
before the full qualified name to display a short name in the TOC.Side effect
When the parent class is not documented, inherited members in the TOC will become non-clickable, even if the inherited class includes the inherited members, because by default it redirects to the parent class. A possible solution is to introduce a configure variable to let the users decide where they would like to place inherited members.