Extract API documentation about python objects by parsing their source
code.
ValueDoc
|
parse_docs(filename=True,
name=True,
context=True,
is_script=True)
Generate the API documentation for a specified object by parsing
Python source files, and return it as a ValueDoc. |
source code
call graph
|
|
Call Graph |
|
|
_parse_package(package_dir)
If the given directory is a package directory, then parse its
__init__.py file (and the __init__.py files of all ancestor
packages); and return its ModuleDoc . |
source code
call graph
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
shallow_parse(line_toks)
Given a flat list of tokens, return a nested tree structure
(called a token
tree), whose leaves are identical to the original list, but whose
structure reflects the structure implied by the grouping tokens
(i.e., parenthases, braces, and brackets). |
source code
call graph
|
|
Call Graph |
|
|
|
Call Graph |
|
|
process_control_flow_line(line,
parent_docs,
prev_line_doc,
lineno,
comments,
decorators,
encoding) |
source code
call graph
|
|
Call Graph |
|
|
process_import(line,
parent_docs,
prev_line_doc,
lineno,
comments,
decorators,
encoding) |
source code
call graph
|
|
Call Graph |
|
|
process_from_import(line,
parent_docs,
prev_line_doc,
lineno,
comments,
decorators,
encoding) |
source code
call graph
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
_add_import_var(src,
name,
container)
Add a new imported variable named name to
container , with imported_from=src . |
source code
call graph
|
|
Call Graph |
|
|
_global_name(name,
parent_docs)
If the given name is package-local (relative to the current
context, as determined by parent_docs ), then convert it
to a global name. |
source code
call graph
|
|
Call Graph |
|
|
process_assignment(line,
parent_docs,
prev_line_doc,
lineno,
comments,
decorators,
encoding) |
source code
call graph
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
dotted_names_in(elt_list)
Return a list of all simple dotted names in the given
expression. |
source code
call graph
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
parse_funcdef_arg(elt)
If the given tree token element contains a valid function
definition argument (i.e., an identifier token or nested list of
identifiers), then return a corresponding string identifier or nested
list of string identifiers. |
source code
call graph
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
VariableDoc or None
|
lookup_name(identifier,
parent_docs)
Find and return the documentation for the variable named by the
given identifier. |
source code
call graph
|
|
Call Graph |
|
|
|
Call Graph |
|
|
lookup_value(dotted_name,
parent_docs)
Find and return the documentation for the value contained in the
variable with the given name in the current namespace. |
source code
call graph
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
|
Call Graph |
|
|
flatten(lst,
out=True)
Returns:
a flat list containing the leaves of the given nested list. |
source code
|
|
dict
|
_moduledoc_cache = { ' /home/edloper/data/projects/docutils/docu ...
A cache of ModuleDoc s that we've already created.
|
|
PARSE_TRY_BLOCKS = True
Should the contents of try blocks be examined?
|
|
PARSE_EXCEPT_BLOCKS = True
Should the contents of except blocks be examined?
|
|
PARSE_FINALLY_BLOCKS = True
Should the contents of finally blocks be
examined?
|
|
PARSE_IF_BLOCKS = True
Should the contents of if blocks be examined?
|
|
PARSE_ELSE_BLOCKS = True
Should the contents of else and elif
blocks be examined?
|
|
PARSE_WHILE_BLOCKS = True
Should the contents of while blocks be examined?
|
|
PARSE_FOR_BLOCKS = True
Should the contents of for blocks be examined?
|
|
IMPORT_HANDLING = ' link '
What should docparser do when it encounters an import
statement?
|
|
IMPORT_STAR_HANDLING = ' parse '
When docparser encounters a 'from m import *' statement, and is unable to parse
m (either because IMPORT_HANDLING='link' , or because
parsing failed), how should it determine the list of identifiers
expored by m ?
|
|
DEFAULT_DECORATOR_BEHAVIOR = ' transparent '
When DocParse encounters an unknown decorator, what
should it do to the documentation of the decorated function?
|
|
BASE_HANDLING = ' parse '
What should docparser do when it encounters a base
class that was imported from another module?
|
|
COMMENT_DOCSTRING_MARKER = ' #: '
The prefix used to mark comments that contain attribute docstrings
for variables.
|
|
START_GROUP_MARKER = ' #{ '
The prefix used to mark a comment that starts a group.
|
|
END_GROUP_MARKER = ' #} '
The prefix used to mark a comment that ends a group.
|
|
CONTROL_FLOW_KEYWORDS = [ ' if ' , ' elif ' , ' else ' , ' while ' , ' for ' , ...
A list of the control flow keywords.
|