swh.web.doc_config module

class swh.web.doc_config.SimpleDocumenter(directive: DocumenterBridge, name: str, indent: str = '')[source]

Bases: sphinx.ext.autodoc.FunctionDocumenter

Custom autodoc directive to display a docstring unindented and without function signature header.

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.web.doc_config.setup(app)[source]
swh.web.doc_config.customize_sphinx_conf(sphinx_conf)[source]

Utility function used to customize the sphinx doc build for swh-web globally (when building doc from swh-docs) or locally (when building doc from swh-web).

Parameters

sphinx_conf (module) – a reference to the sphinx conf.py module used to build the doc.