In autodoc, I know you can hide the docstrings for all modules as described here: Exclude module docstring in autodoc
But is there a way to do this for some modules and not others, possibly with some parameter passed to automodule? In other words, for a given module, I want to sometimes include the docstrings and sometimes skip it. If I do:
.. automodule:: foo :members: foo, foo.bar Sphinx generates the docstrings for foo and foo.bar. However, doing
.. automodule:: foo :members: foo.bar will not hide the module docstring.
yourmodule.if what == "module" and name in ("module1", "module2", "module3"):. Wouldn't that work? Am I misunderstanding something?