flake8_helper¶
A helper library for Flake8 plugins.
Data:
Invariant |
|
Invariant |
Classes:
- _V = TypeVar(_V, bound=Visitor)¶
Type:
TypeVarInvariant
TypeVarbound toflake8_helper.Visitor.TypeVar for
Visitorand subclasses.
- class Visitor[source]¶
Bases:
NodeVisitorAST node visitor.
Attributes:
The list of Flake8 errors identified by the visitor.
Methods:
report_error(node, error)Report an error for the given node.
- _P = TypeVar(_P, bound=Plugin)¶
Type:
TypeVarInvariant
TypeVarbound toflake8_helper.Plugin.
- class Plugin(tree)[source]¶
-
Abstract base class for Flake8 plugins.
- Parameters
tree (
AST) – The abstract syntax tree (AST) to check.
Minimum example:
Attributes:
The abstract syntax tree (AST) being checked.
The plugin name.
The plugin version.
The visitor class to use to traverse the AST.
Methods:
run()Traverse the Abstract Syntax Tree and identify errors.
- _tree¶
The abstract syntax tree (AST) being checked.
- abstract property visitor_class¶
The visitor class to use to traverse the AST.