mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Close #3014: autodoc: Add autodoc-process-bases
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.
This commit is contained in:
@@ -749,6 +749,21 @@ needed docstring processing in event :event:`autodoc-process-docstring`:
|
||||
.. autofunction:: cut_lines
|
||||
.. autofunction:: between
|
||||
|
||||
.. event:: autodoc-process-bases (app, name, obj, options, bases)
|
||||
|
||||
.. versionadded:: 4.1
|
||||
|
||||
Emitted when autodoc has read and processed a class to determine the
|
||||
base-classes. *bases* is a list of classes that the event handler can
|
||||
modify **in place** to change what Sphinx puts into the output. It's
|
||||
emitted only if ``show-inheritance`` option given.
|
||||
|
||||
:param app: the Sphinx application object
|
||||
:param name: the fully qualified name of the object
|
||||
:param obj: the object itself
|
||||
:param options: the options given to the class directive
|
||||
:param bases: the list of base classes signature. see above.
|
||||
|
||||
|
||||
Skipping members
|
||||
----------------
|
||||
|
||||
Reference in New Issue
Block a user