module documentation

Utilities parsing and analyzing Python code.

Unknown Field: copyright
Copyright 2007-2022 by the Sphinx team, see AUTHORS.
Unknown Field: license
BSD, see LICENSE for details.
Variable comment​_re Undocumented
Variable emptyline​_re Undocumented
Variable indent​_re Undocumented
Class ​After​Comment​Parser Python source code parser to pick up comments after assignments.
Class ​Definition​Finder 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 ​Token​Processor No class docstring; 0/4 instance variable, 3/4 methods documented
Class ​Variable​Comment​Picker 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.
comment_re =

Undocumented

emptyline_re =

Undocumented

indent_re =

Undocumented

def dedent_docstring(s):
Remove common leading indentation from docstring.
Parameters
s:strUndocumented
Returns
strUndocumented
def filter_whitespace(code):

Undocumented

Parameters
code:strUndocumented
Returns
strUndocumented
def get_assign_targets(node):
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):

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.argUndocumented
Returns
List[str]Undocumented