I am generating the documentation of a python project using Sphinx / sphinx-autodoc / sphinx_rtd_theme. Recently, I added type hints to my project which forced me to update Sphinx to the latest version (6.1) to handle these correctly. Since I updated Sphinx, all classes/functions description generated by autodoc (autoclass and automethod) now shows up in the table of content and I do not want that.
I found that I could manually add :noindex:
to each autoclass/automethod directive, which almost works but it looks like there's a strange behaviour when I add :noindex:
to all classes under a page. Although class and method disappear, the class members suddenly appears in the table of content.
Can I tell Sphinx to simply not put anything generated by autodoc in the table of content?
See the problem here:
- Master branch : Generated with Sphinx 1.3. Table of content is good, by method signature is polluted by typehints
- Dev branch : Sphinx 6.1 . Typehint is handled properly, but table of content is polluted by autoclass/automethod elements.