{"id":26750,"library":"autoclasstoc","title":"autoclasstoc","description":"Add a succinct table of contents to Sphinx auto-documented classes, making navigation easier. Version 1.7.0, stable and infrequently updated.","status":"active","version":"1.7.0","language":"python","source_language":"en","source_url":"https://github.com/stephenfin/autoclasstoc","tags":["sphinx","documentation","autodoc","toc"],"install":[{"cmd":"pip install autoclasstoc","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required to use the `autoclasstoc` directive in Sphinx builds.","package":"sphinx","optional":false}],"imports":[{"note":"The library is a Sphinx extension; it is not meant to be imported in Python code. Instead, add 'autoclasstoc' to the `extensions` list in your conf.py.","symbol":"autoclasstoc","correct":"from sphinx.ext.autodoc import cut_lines, between\n# The extension is loaded via conf.py extensions list, not direct import."},{"note":"Common mistake: using `automodule` instead of `autoclasstoc`. The directive is `.. autoclasstoc::` with options like `:ignore:`.","wrong":".. automodule::\n   :members:\n   :noindex:","symbol":"autoclasstoc directive","correct":".. autoclasstoc::"}],"quickstart":{"code":"extensions = ['sphinx.ext.autodoc', 'autoclasstoc']\n\n# In your .rst file:\n# .. autoclasstoc::\n#    :ignore: __init__\n#    :order: source\n#    :sections: Attributes, Methods\n\n# Then use .. autoclass:: to document a class and the TOC appears.","lang":"python","description":"Enable the extension in conf.py, then use the `.. autoclasstoc::` directive in your RST to generate a table-of-contents for auto-documented class members."},"warnings":[{"fix":"Ensure `extensions` list has `'sphinx.ext.autodoc'` before `'autoclasstoc'`.","message":"`autoclasstoc` requires `sphinx.ext.autodoc` to be loaded first. If not, the extension silently fails.","severity":"gotcha","affected_versions":"all"},{"fix":"List method names without arguments.","message":"The `:ignore:` directive does not work with parenthesized names like `__init__(self)`. Use just `:ignore: __init__` (no parentheses).","severity":"gotcha","affected_versions":"all"},{"fix":"Remove `:members:` from the `autoclasstoc` directive; it has no effect.","message":"The `:members:` option on `autoclasstoc` is deprecated and may be removed. It is ignored in modern versions.","severity":"deprecated","affected_versions":">=1.6"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install autoclasstoc` in the same environment as Sphinx.","cause":"`autoclasstoc` is not installed in the Python environment used by Sphinx.","error":"Extension error: Could not import extension autoclasstoc (exception: No module named 'autoclasstoc')"},{"fix":"Add `'autoclasstoc'` to the `extensions` list and ensure `sphinx.ext.autodoc` is also present.","cause":"The extension is not enabled in conf.py or is listed after a broken extension.","error":"WARNING: unknown directive: autoclasstoc"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}