I am using Sphinx with PydataSphinxTheme. I created a custom class template which goes over all the attributes and methods of a class and uses autodoc to document them, like so:
*****************
Attribute details
*****************
{% for item in attributes %}
.. autoattribute:: {{ item }}
{% endfor %}
Here, {{ item }}
is only the name of the method, not the method name with the class prefix. I ommited some formatting from the template, but this is the main gist.
The result is that, if I have a class called MyClass
with a method called myMethod
, the method will be documented as myMethod
, but the page contents navbar on the right will still contain MyClass.myMethod
.
I want it to say only myMethod
because it is obvious what the containing class is.
It seems that the automethod
directive creates these page contents entries.
I have the add_module_names = False
options in conf.py
already set.
Figures:
- method name in the body of the page
- method names in the page contents