Here is a way to accomplish what the OP asks for:
-
Add an
__all__
list inpkg/__init__.py
:from base import Base # Or use 'from base import *' __all__ = ["Base"]
-
Use
.. automodule:: pkg
in the .rst file.
Sphinx will now output documentation where the class name is shown as pkg.Base
instead of pkg.base.Base
.