more_autodoc.no_docstring

Adds the :no-docstring: option to automodule directives to exclude the docstring from the output.

New in version 1.0.0: Functions in this module moved from sphinx_toolbox.more_autodoc.__init__.py

Enable sphinx_toolbox.more_autodoc.no_docstring by adding the following to the extensions variable in your conf.py:

extensions = [
    ...
    'sphinx_toolbox.more_autodoc.no_docstring',
    ]

For more information see https://www.sphinx-doc.org/en/master/usage/extensions#third-party-extensions .

Functions:

automodule_add_nodocstring(app)

Add the :no-docstring: option to automodule directives.

no_docstring_process_docstring(app, what, …)

Remove module docstrings if the :no-docstring: flag was set.

setup(app)

Setup sphinx_toolbox.more_autodoc.no_docstring.

automodule_add_nodocstring(app)[source]

Add the :no-docstring: option to automodule directives.

The option is used to exclude the docstring from the output

Parameters

app (Sphinx) – The Sphinx application.

no_docstring_process_docstring(app, what, name, obj, options, lines)[source]

Remove module docstrings if the :no-docstring: flag was set.

Parameters
  • app (Sphinx) – The Sphinx application.

  • what

  • name (str) – The name of the object being documented.

  • obj – The object being documented.

  • options – Mapping of autodoc options to values.

  • lines (List[str]) – List of strings representing the current contents of the docstring.

setup(app)[source]

Setup sphinx_toolbox.more_autodoc.no_docstring.

Parameters

app (Sphinx) – The Sphinx application.

Return type

SphinxExtMetadata