module documentation

Utilities for docstring processing.

Unknown Field: copyright
Copyright 2007-2022 by the Sphinx team, see AUTHORS.
Unknown Field: license
BSD, see LICENSE for details.
Variable field​_list​_item​_re Undocumented
Function extract​_metadata Undocumented
Function prepare​_commentdoc Extract documentation comment lines (starting with #:) and return them as a list of lines. Returns an empty list if there is no documentation.
Function prepare​_docstring Convert a docstring into lines of parseable reST. Remove common leading indentation, where the indentation of a given number of lines (usually just one) is ignored.
Function separate​_metadata Separate docstring into metadata and others.
field_list_item_re =

Undocumented

def extract_metadata(s):

Undocumented

Parameters
s:strUndocumented
Returns
Dict[str, str]Undocumented
def prepare_commentdoc(s):
Extract documentation comment lines (starting with #:) and return them as a list of lines. Returns an empty list if there is no documentation.
Parameters
s:strUndocumented
Returns
List[str]Undocumented
def prepare_docstring(s, ignore=None, tabsize=8):

Convert a docstring into lines of parseable reST. Remove common leading indentation, where the indentation of a given number of lines (usually just one) is ignored.

Return the docstring as a list of lines usable for inserting into a docutils ViewList (used as argument of nested_parse().) An empty line is added to act as a separator between this docstring and following content.

Parameters
s:strUndocumented
ignore:intUndocumented
tabsize:intUndocumented
Returns
List[str]Undocumented
def separate_metadata(s):
Separate docstring into metadata and others.
Parameters
s:strUndocumented
Returns
Tuple[str, Dict[str, str]]Undocumented