When I use Sphinx automethod to document a specific method like so:
.. automethod:: my_module.MyClass.my_method
The resulting docs append the class name to the method name like this:
MyClass.my_method(kwarg1=None, kwarg2=None)
This is the docstring for my_method...
Is there any way to tell automethod to not prefix the method name with the class name, such that the resulting docs look like this:
my_method(kwarg1=None, kwarg2=None)
This is the docstring for my_method...
?
In addition to
add_module_names = False
use
.. autofunction:: my_module.MyClass.my_method
instead of automodule
and the class name is omitted in the generated doc.