class documentation

A standard intermediate representation for parsed docstrings that can be used to generate output. Parsed docstrings are produced by markup parsers such as pydoctor.epydoc.markup.epytext.parse_docstring() or pydoctor.epydoc.markup.restructuredtext.parse_docstring().

Subclasses must implement has_body() and to_node().

A default implementation for to_stan() method, relying on to_node() is provided. But some subclasses override this behaviour.

Implementation of get_toc() also relies on to_node().

Method __init__ Undocumented
Method get_summary Returns the summary of this docstring.
Method get_toc The table of contents of the docstring if titles are defined or None.
Method to_node Translate this docstring to a nodes.document.
Method to_stan Translate this docstring to a Stan tree.
Instance Variable fields A list of Fields, each of which encodes a single field. The field's bodies are encoded as ParsedDocstrings.
Property has_body Does this docstring have a non-empty body?
Instance Variable _stan Undocumented
Instance Variable _summary Undocumented
def get_summary(self) -> ParsedDocstring: (source)

Returns the summary of this docstring.

Note
The summary is cached.
def get_toc(self, depth: int) -> ParsedDocstring | None: (source)

The table of contents of the docstring if titles are defined or None.

def to_stan(self, docstring_linker: DocstringLinker) -> Tag: (source)

Translate this docstring to a Stan tree.

Parameters
docstring_linker:DocstringLinkerAn HTML translator for crossreference links into and out of the docstring.
Returns
TagThe docstring presented as a stan tree.
Raises
ExceptionIf something went wrong. Callers should generally catch Exception when calling to_stan().
Note
The default implementation relies on functionalities provided by node2stan.node2stan and ParsedDocstring.to_node().

A list of Fields, each of which encodes a single field. The field's bodies are encoded as ParsedDocstrings.

Undocumented