Home | Trees | Indices | Help |
|
---|
|
Parse docstrings and handle any fields it defines, such as
@type
and @author
. Fields are used to describe
specific information about an object. There are two classes of fields:
simple fields
and special
fields.
Simple fields are fields that get stored directly in an
APIDoc
's metadata dictionary, without any special
processing. The set of simple fields is defined by the list STANDARD_FIELDS, whose elements are DocstringFields.
Special fields are fields that perform some sort of processing on the
APIDoc
, or add information to attributes other than the
metadata dictionary. Special fields are are handled by field handler
functions, which are registered using register_field_handler.
|
|||
DocstringField A simple docstring field, which can be used to describe specific information about an object, such as its author or its version. |
|
|||
Docstring Parsing | |||
---|---|---|---|
|
|||
|
|||
|
|||
list of markup.Field
|
|
||
|
|||
Field Processing | |||
|
|||
|
|||
|
|||
Field Handler Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Helper Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
list of string
|
|
||
|
|||
Function Signature Extraction | |||
None
|
|
|
|||
STANDARD_FIELDS =
A list of the standard simple fields accepted by epydoc. |
|||
Docstring Parsing | |||
---|---|---|---|
DEFAULT_DOCFORMAT =
The name of the default markup languge used to process docstrings. |
|||
RETURN_PDS = markup.parse('Returns:', markup= 'epytext') A ParsedDocstring containing the text 'Returns'. |
|||
Field Processing Error Messages | |||
UNEXPECTED_ARG =
|
|||
EXPECTED_ARG =
|
|||
EXPECTED_SINGLE_ARG =
|
|||
BAD_CONTEXT =
|
|||
REDEFINED =
|
|||
UNKNOWN_TAG =
|
|||
BAD_PARAM =
|
|||
Field Processing | |||
_field_dispatch_table = {}
|
|||
Field Handler Functions | |||
PARAMETER_TAGS =
|
|||
VARIABLE_TAGS =
|
|||
EXCEPTION_TAGS =
|
|||
Helper Functions | |||
_IDENTIFIER_LIST_REGEXP = re.compile(r'^
|
|||
Function Signature Extraction | |||
_SIGNATURE_RE = re.compile(r'^\s A regular expression that is used to extract signatures from docstrings. |
|
Process the given
|
Remove the fields related to the constructor from a class docstring fields list.
|
Process a single field, and use it to update
|
Return a list of user defined fields that can be used for the given
object. This list is taken from the given Note:
We assume here that a parent's docstring will always be parsed
before its childrens'. This is indeed the case when we are called
via docbuilder.build_doc_index(). If a child's
docstring is parsed before its parents, then its parent won't yet
have had its |
Register the given field handler function for processing any of the given field tags. Field handler functions should have the following signature: >>> def field_handler(api_doc, docindex, tag, arg, descr): ... '''update api_doc in response to the field.''' Where |
Given a
|
Construct the signature for a builtin function or method from its
docstring. If the docstring uses the standard convention of including a
signature in the first line of the docstring (and formats that signature
according to standard conventions), then it will be used to extract a
signature. Otherwise, the signature will be set to a single varargs
variable named
|
|
STANDARD_FIELDSA list of the standard simple fields accepted by epydoc. This list
can be augmented at run-time by a docstring with the special
|
RETURN_PDSA ParsedDocstring containing the text 'Returns'. This is used to
construct summary descriptions for routines that have empty
|
PARAMETER_TAGS
|
_IDENTIFIER_LIST_REGEXP
|
_SIGNATURE_REA regular expression that is used to extract signatures from docstrings.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jun 13 23:50:03 2008 | http://epydoc.sourceforge.net |