Sphinx, using automodule to find submodules

Viewed 27324

When using sphinx's automodule (https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html),

I simply write in a .rst file:

.. automodule:: my_module
    :members:

It documents my_module fine, but it doesn't find the inner modules like my_module.inner_module0 and my_module.inner_module1. Is there something that needs to be specified in the __init__.py file besides the __all__ variable?

Also, I'm aware of sphinx-apidoc. But that command documents far too much (exposes every function/folder including undocumented ones).

2 Answers
Related