class documentation

Parser for Google-style docstrings.

Method __init__ Setup sections.
Method add_section Add or replace a section.
Method parse Parse the Google-style docstring into its components.
Instance Variable sections Undocumented
Instance Variable title_colon Undocumented
Instance Variable titles_re Undocumented
Static Method _build_multi_meta Undocumented
Static Method _build_single_meta Undocumented
Method _build_meta Build docstring element.
Method _setup Undocumented
def __init__(self, sections: list[Section] | None = None, title_colon=True): (source)

Setup sections.

Parameters
sections:list[Section] | NoneRecognized sections or None to defaults.
title_colonrequire colon after section title.
def add_section(self, section: Section): (source)

Add or replace a section.

Parameters
section:SectionThe new section.
def parse(self, text: str | None) -> Docstring: (source)

Parse the Google-style docstring into its components.

Returns
Docstringparsed docstring
sections = (source)

Undocumented

title_colon = (source)

Undocumented

titles_re = (source)

Undocumented

def _build_multi_meta(section: Section, before: str, desc: str) -> DocstringMeta: (source)

Undocumented

def _build_single_meta(section: Section, desc: str) -> DocstringMeta: (source)

Undocumented

def _build_meta(self, text: str, title: str) -> DocstringMeta: (source)

Build docstring element.

Parameters
text:strdocstring element text
title:strtitle of section containing element
Returns
DocstringMeta
def _setup(self): (source)

Undocumented