Twisted
Home FAQ Docs Download Timeline Roadmap View Tickets Search
class documentation

Add ParsedDocstring interface on top of TypeDocstring and allow to parse types from nodes.Node objects, providing the --process-types option.

Method __init__ Undocumented
Method to_node Translate this docstring to a nodes.document.
Constant FIELDS Undocumented
Instance Variable warnings Undocumented
Property has_body Does this docstring have a non-empty body?
Method _parse_tokens Convert type to docutils document object.
Class Variable _converters Undocumented
Instance Variable _document Undocumented
Instance Variable _lineno Undocumented
Instance Variable _tokens Undocumented

Inherited from ParsedDocstring:

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_stan Translate this docstring to a Stan tree.
Method to_text Translate this docstring to a string. The default implementation depends on to_node.
Instance Variable fields A list of Fields, each of which encodes a single field. The field's bodies are encoded as ParsedDocstrings.
Instance Variable _stan Undocumented
def __init__(self, annotation: nodes.document, warns_on_unknown_tokens: bool = False, lineno: int = 0): (source)
def to_node(self) -> nodes.document: (source)

Translate this docstring to a nodes.document.

Returns
nodes.documentThe docstring presented as a nodes.document.
Note
Some ParsedDocstring subclasses do not support docutils nodes. This method might raise NotImplementedError in such cases. (i.e. pydoctor.epydoc.markup._types.ParsedTypeDocstring)
FIELDS: tuple[str, ...] = (source)

Undocumented

Value
('type', 'rtype', 'ytype', 'returntype', 'yieldtype')
warnings = (source)

Undocumented

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.

def _parse_tokens(self) -> nodes.document: (source)

Convert type to docutils document object.

_converters: dict[TokenType, Callable[[str, int], nodes.Node]] = (source)

Undocumented

_document = (source)

Undocumented

Undocumented

Undocumented