Description
I would like to change the formatting of the base list for classes. Specifially I would like to provide information about parameterized types (e.g. Dict[str, int
]). See agronholm/sphinx-autodoc-typehints#8 for how I want to use it.
For that I need a new hook/event similar to the existing autodoc-process-signature
. I propose the signature autodoc-process-bases(app, what, name, obj, options, formatted_bases)
. The first five arguments are exactly the same as for the existing events. The last one is the list of formatted strings generated in add_directive_header
for the bases. It can be modified to change what is output. Alternatively, to provide even more freedom, the hook can return a string. This string is then inserted instead of the "Bases: ..." line.
I can provide an implementation in a pull request, if you like the idea.
Activity
Close sphinx-doc#3014: autodoc: Add autodoc-process-bases
Close sphinx-doc#3014: autodoc: Add autodoc-process-bases
Merge pull request #9233 from tk0miya/3014_autodoc-process-bases