user12733685
user12733685

Reputation: 35

Sphinx Documentation - Exclude class variables for all the modules in the hierarchy

I'm trying to remove all the class variables from my Sphinx documentation (because I haven't documented them and it doesn't look good if there's only a list of them) for all the classes of my project including the modules in the folders. Is there an easy way to do it without having to exclude each one of them?

P.S.: I'm a beginner at this, so the answer could be something easy. Also, this could already be answered, but I couldn't find anything.

Upvotes: 1

Views: 1514

Answers (1)

Saransh
Saransh

Reputation: 95

You can use :no-undoc-members: to tell sphinx to ignore the undocumented (in your case the class) variables.

:undoc-members: (no value)
    If set, autodoc will also generate document for the members not having docstrings:

Here is the documentation - https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#directive-option-automodule-undoc-members

Upvotes: 3

Related Questions