Markup language support for docstrings. Each submodule defines a parser for a single markup language. These parsers convert an object's docstring to a ParsedDocstring
, a standard intermediate representation that can be used to generate output.
A ParsedDocstring is used for output generation (to_stan()
). It also stores the fields that were extracted from the docstring during parsing (fields
).
The parse_docstring() functions in the format modules take a docstring, parse it and return a format-specific subclass of ParsedDocstring. A docstring's fields are separated from the body during parsing.
The ParsedDocstring output generation method (to_stan()
) uses a DocstringLinker
to link the docstring output with the rest of the documentation that epydoc generates. DocstringLinkers are responsible for formatting cross-references (link_xref()
).
Markup errors are represented using ParseError
s. These exception classes record information about the cause, location, and severity of each error.
Module | epytext |
No summary |
Module | google |
Parser for google-style docstrings. |
Module | numpy |
Parser for numpy-style docstrings. |
Module | plaintext |
Parser for plaintext docstrings. Plaintext docstrings are rendered as verbatim output, preserving all whitespace. |
Module | restructuredtext |
No summary |
Module | _napoleon |
This module contains a class to wrap shared behaviour between pydoctor.epydoc.markup.numpy and pydoctor.epydoc.markup.google . |
Module | _pyval_repr |
Syntax highlighter for Python values. Currently provides special colorization support for: |
Module | _types |
Render types from docutils.nodes.document objects. |
From __init__.py
:
Class | DocstringLinker |
A resolver for crossreference links out of a ParsedDocstring. DocstringLinker is used by ParsedDocstring to look up the target URL for crossreference links. |
Class | Field |
No summary |
Class | ParsedDocstring |
No summary |
Class | ParseError |
The base class for errors generated while parsing docstrings. |
Function | get_parser_by_name |
Get the parse_docstring(str, List[ParseError], bool) -> ParsedDocstring function based on a parser name. |
Function | get_supported_docformats |
Get the list of currently supported docformat. |
Returns | |
Iterator[ | Undocumented |
Parameters | |
docformat:str | Undocumented |
obj:Optional[ | Undocumented |
Returns | |
Callable[ | Undocumented |
Raises | |
ImportError | If the parser could not be imported, probably meaning that your are missing a dependency or it could be that the docformat name do not match any know pydoctor.epydoc.markup submodules. |