diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-05-01 14:50:46 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-05-01 14:53:06 +0900 |
| commit | d8a9f243e29ebb818d739a054c8b3afc6c81cd88 (patch) | |
| tree | 41b3a968e12d5f6865645b61266da3783a224cbb /doc/usage/extensions | |
| parent | d656acaba3258fa6e9beb75e8409412315efb107 (diff) | |
| download | sphinx-git-d8a9f243e29ebb818d739a054c8b3afc6c81cd88.tar.gz | |
Close #8107: autodoc: Add class-doc-from option to autoclass directive
Add `class-doc-from` option to the `autoclass` directive to control
the content of the specific class. It takes `class`, `init`, and `both`
like `autoclass_content`.
Diffstat (limited to 'doc/usage/extensions')
| -rw-r--r-- | doc/usage/extensions/autodoc.rst | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/usage/extensions/autodoc.rst b/doc/usage/extensions/autodoc.rst index da0ff7c99..13a2b3010 100644 --- a/doc/usage/extensions/autodoc.rst +++ b/doc/usage/extensions/autodoc.rst @@ -343,6 +343,10 @@ inserting them into the page source under a suitable :rst:dir:`py:module`, .. autoclass:: module.name::Noodle + * :rst:dir:`autoclass` also recognizes the ``class-doc-from`` option that + can be used to override the global value of :confval:`autoclass_content`. + + .. versionadded:: 4.1 .. rst:directive:: autofunction autodecorator @@ -507,7 +511,7 @@ There are also config values that you can set: The supported options are ``'members'``, ``'member-order'``, ``'undoc-members'``, ``'private-members'``, ``'special-members'``, ``'inherited-members'``, ``'show-inheritance'``, ``'ignore-module-all'``, - ``'imported-members'`` and ``'exclude-members'``. + ``'imported-members'``, ``'exclude-members'`` and ``'class-doc-from'``. .. versionadded:: 1.8 @@ -517,6 +521,9 @@ There are also config values that you can set: .. versionchanged:: 2.1 Added ``'imported-members'``. + .. versionchanged:: 4.1 + Added ``'class-doc-from'``. + .. confval:: autodoc_docstring_signature Functions imported from C modules cannot be introspected, and therefore the |
