module documentation

Utilities parsing and analyzing Python code.

Class AfterCommentParser Python source code parser to pick up comments after assignments.
Class DefinitionFinder Python source code parser to detect location of functions, classes and methods.
Class Parser Python source code parser to pick up variable comments.
Class Token Better token wrapper for tokenize module.
Class TokenProcessor No class docstring; 0/4 instance variable, 3/4 methods documented
Class VariableCommentPicker Python source code parser to pick up variable comments.
Function dedent_docstring Remove common leading indentation from docstring.
Function filter_whitespace Undocumented
Function get_assign_targets Get list of targets from Assign and AnnAssign node.
Function get_lvar_names Convert assignment-AST to variable names.
Variable comment_re Undocumented
Variable emptyline_re Undocumented
Variable indent_re Undocumented
def dedent_docstring(s): (source)

Remove common leading indentation from docstring.

Parameters
s:strUndocumented
Returns
strUndocumented
def filter_whitespace(code): (source)

Undocumented

Parameters
code:strUndocumented
Returns
strUndocumented
def get_assign_targets(node): (source)

Get list of targets from Assign and AnnAssign node.

Parameters
node:ast.ASTUndocumented
Returns
list[ast.expr]Undocumented
def get_lvar_names(node, self=None): (source)

Convert assignment-AST to variable names. This raises `TypeError` if the assignment does not create new variable:: ary[0] = 'foo' dic["bar"] = 'baz' # => TypeError

Parameters
node:ast.ASTUndocumented
self:ast.arg|NoneUndocumented
Returns
list[str]Undocumented
comment_re = (source)

Undocumented

emptyline_re = (source)

Undocumented

indent_re = (source)

Undocumented