You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Add `autodoc-process-bases` to modify the base classes of the class
definitions. This allows the extensions to insert or modify the list
of the base classes via event-handlers.
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 signatureautodoc-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 inadd_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.
The text was updated successfully, but these errors were encountered: