I have a file layout that looks like:
/my_module
__init__.py
submodule1.py
submodule2.py
I use Sphinx's automodule
directive like:
.. automodule:: my_module.submodule1
It produces documents that say my command name is something like: my_module.submodule1.my_function
. But my __init__
pulls submodule1
into the my_module
namespace. So what I really want is for the documentation to say my_module.my_function
instead. Leave out the submodule1
, since that's not what users are going to use.
Is there a way to do this?