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 _compact Undocumented
Instance Variable _stan Undocumented
Instance Variable _summary Undocumented
def get_summary(self): (source)

Returns the summary of this docstring.

Returns
ParsedDocstringUndocumented
Note
The summary is cached.
def get_toc(self, depth): (source)

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

Parameters
depth:intUndocumented
Returns
Optional[ParsedDocstring]Undocumented
def to_stan(self, docstring_linker, compact=True): (source)

Translate this docstring to a Stan tree.

Parameters
docstring_linker:DocstringLinkerAn HTML translator for crossreference links into and out of the docstring.
compact:boolUndocumented
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.

_compact = (source)

Undocumented