I am using Sphinx to build documentation for a package. I can't find a way to skip (remove) empty submodules when building doc. Example in Section 2
there is a subsection named Submodule
which is blank I want to skip such subsections. I tried using the following code.
def skip_util_classes(app, what, name, obj, skip, options):
if what == "Submodules":
skip = True
return skip
def setup(sphinx):
sphinx.connect("autodoc-skip-member", skip_util_classes)
The above code is not eliminating section Submodules
.
I want to know how can I define a section or subsection that needs to be skipped? And how can I define empty section or subsection that I want to skip in skip_util_classes
?