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 |
Parser for epytext strings. Epytext is a lightweight markup whose primary intended application is Python documentation strings. This parser converts Epytext strings to a simple DOM-like representation (encoded as a tree of ... |
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 |
Epydoc parser for ReStructuredText strings. ReStructuredText is the standard markup language used by the Docutils project. parse_docstring() provides the primary interface to this module; it returns a ... |
Module | _napoleon |
This module contains a class to wrap shared behaviour between pydoctor.epydoc.markup.numpy and pydoctor.epydoc.markup.google . |
Module | _pyval |
Syntax highlighter for Python values. Currently provides special colorization support for: |
Module | _types |
Render types from docutils.nodes.document objects. |
From __init__.py
:
Class |
|
A resolver for crossreference links out of a ParsedDocstring. DocstringLinker is used by ParsedDocstring to look up the target URL for crossreference links. |
Class |
|
The contents of a docstring's field. Docstring fields are used to describe specific aspects of an object, such as a parameter of a function or the author of a module. Each field consists of a tag, an optional argument, and a body:... |
Class |
|
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() ... |
Class |
|
A docutils node visitor that extracts first sentences from the first paragraph in a document. |
Exception |
|
The base class for errors generated while parsing docstrings. |
Function | append |
Utility method to create non fatal ParseError s and append them to the provided list. |
Function | get |
Get the parse_docstring(str, List[ParseError], bool) -> ParsedDocstring function based on a parser name. |
Function | get |
Get the list of currently supported docformat. |
Function | processtypes |
Wraps a docstring parser function to provide option --process-types. |
Type Alias |
|
A simpler version of DocumentableKind used for docstring parsing only. |
Type Alias |
|
Undocumented |
Utility method to create non fatal ParseError
s and append them to the provided list.
Parameters | |
warns:list[ | The warnings strings. |
errs:list[ | The list of errors. |
lineno:int | Undocumented |
str
, objclass: ObjClass | None
= None) -> ParserFunction
:
(source)
¶
Get the parse_docstring(str, List[ParseError], bool) -> ParsedDocstring function based on a parser name.
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. |
A simpler version of DocumentableKind
used for docstring parsing only.
Value |
|