module documentation

Utilities for docstring processing.

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 the first line is ignored.
Function separate_metadata Separate docstring into metadata and others.
Variable field_list_item_re Undocumented
def prepare_commentdoc(s): (source)

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, tabsize=8): (source)

Convert a docstring into lines of parseable reST. Remove common leading indentation, where the indentation of the first line 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
tabsize:intUndocumented
Returns
list[str]Undocumented
def separate_metadata(s): (source)

Separate docstring into metadata and others.

Parameters
s:strUndocumented
Returns
tuple[str, dict[str, str]]Undocumented
field_list_item_re = (source)

Undocumented