swh.docs.sphinx.conf module

class swh.docs.sphinx.conf.SimpleDocumenter(directive: DocumenterBridge, name: str, indent: str = '')[source]

Bases: sphinx.ext.autodoc.FunctionDocumenter

Custom autodoc directive to inline the docstring of a function in a document without the signature header and with no indentation.

Example of use:

.. autosimple:: swh.web.api.views.directory.api_directory
objtype = 'simple'

name by which the directive is called (auto…) and the default generated directive name

priority = -1

priority if multiple documenters return True from can_document_member

content_indent = ''

indentation by which to indent the directive content

add_directive_header(sig)[source]

Add the directive header and options to the generated content.

swh.docs.sphinx.conf.set_django_settings(app, env, docname)[source]
swh.docs.sphinx.conf.add_glossary_to_index(app, docname, source)[source]
swh.docs.sphinx.conf.setup(app)[source]