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
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 Field s, 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 |
pydoctor.epydoc.markup._types.ParsedTypeDocstring
, pydoctor.epydoc.markup.epytext.ParsedEpytextDocstring
, pydoctor.epydoc.markup.plaintext.ParsedPlaintextDocstring
, pydoctor.epydoc.markup.restructuredtext.ParsedRstDocstring
Undocumented
Parameters | |
fields:Sequence[ | Undocumented |
pydoctor.epydoc.markup._types.ParsedTypeDocstring
, pydoctor.epydoc.markup.epytext.ParsedEpytextDocstring
, pydoctor.epydoc.markup.plaintext.ParsedPlaintextDocstring
, pydoctor.epydoc.markup.restructuredtext.ParsedRstDocstring
docutils.nodes.document
.Returns | |
nodes.document | The docstring presented as a docutils.nodes.document . |
pydoctor.epydoc.markup._pyval_repr.ColorizedPyvalRepr
, pydoctor.epydoc.markup._types.ParsedTypeDocstring
, pydoctor.epydoc.markup.plaintext.ParsedPlaintextDocstring
Parameters | |
docstring_linker:DocstringLinker | An HTML translator for crossreference links into and out of the docstring. |
Returns | |
Tag | The docstring presented as a stan tree. |
Note | |
The default implementation relies on functionalities provided by node2stan.node2stan and ParsedDocstring.to_node() . |
Field
s, each of which encodes a single field. The field's bodies are encoded as ParsedDocstrings.bool
=
pydoctor.epydoc.markup._types.ParsedTypeDocstring
, pydoctor.epydoc.markup.epytext.ParsedEpytextDocstring
, pydoctor.epydoc.markup.plaintext.ParsedPlaintextDocstring
, pydoctor.epydoc.markup.restructuredtext.ParsedRstDocstring
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.