class documentation

class ParsedDocstring(abc.ABC):

Known subclasses: pydoctor.epydoc.markup._types.ParsedTypeDocstring, pydoctor.epydoc.markup.epytext.ParsedEpytextDocstring, pydoctor.epydoc.markup.plaintext.ParsedPlaintextDocstring, pydoctor.epydoc.markup.restructuredtext.ParsedRstDocstring

View In Hierarchy

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().

Method __init__ Undocumented
Method to​_node Translate this docstring to a docutils.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
@abc.abstractmethod
def to_node(self):
Translate this docstring to a docutils.nodes.document.
Returns
nodes.documentThe docstring presented as a docutils.nodes.document.
def to_stan(self, docstring_linker):
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.
Note
The default implementation relies on functionalities provided by node2stan.node2stan and ParsedDocstring.to_node().
fields =
A list of Fields, each of which encodes a single field. The field's bodies are encoded as ParsedDocstrings.
@abc.abstractproperty
has_body: bool =

Does this docstring have a non-empty body?

The body is the part of the docstring that remains after the fields have been split off.