class documentation
class BasicErrorChecker(_BasicChecker): (source)
Undocumented
Method | open |
Called before visiting project (i.e. set of modules). |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Check instantiating abstract class with abc.ABCMeta as metaclass. |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Check that a Starred expression is used in an assignment target. |
Method | visit |
Check use of the non-existent ++ and -- operators. |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Method | visit |
Undocumented |
Class Variable | msgs |
Undocumented |
Method | _check |
Check that any loop with an else clause has a break statement. |
Method | _check |
Check that a node is inside a for or while loop. |
Method | _check |
Undocumented |
Method | _check |
Undocumented |
Method | _check |
Check that a name is both nonlocal and global. |
Method | _check |
Undocumented |
Method | _check |
Check for redefinition of a function / method / class name. |
Method | _check |
Undocumented |
Method | _too |
Undocumented |
Instance Variable | _py38 |
Undocumented |
Inherited from _BasicChecker
:
Class Variable | name |
Name of the provider. |
Inherited from BaseChecker
(via _BasicChecker
):
Method | __eq__ |
Permit to assert Checkers are equal. |
Method | __gt__ |
Sorting of checkers. |
Method | __hash__ |
Make Checker hashable. |
Method | __init__ |
Checker instances should have the linter as argument. |
Method | __repr__ |
Undocumented |
Method | __str__ |
This might be incomplete because multiple classes inheriting BaseChecker can have the same name. |
Method | add |
Undocumented |
Method | check |
Check the consistency of msgid. |
Method | close |
Called after visiting project (i.e set of modules). |
Method | create |
Undocumented |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | reduce |
Undocumented |
Class Variable | enabled |
Undocumented |
Class Variable | options |
Options provided by this provider. |
Class Variable | reports |
Undocumented |
Instance Variable | linter |
Undocumented |
Property | messages |
Undocumented |
Inherited from _ArgumentsProvider
(via _BasicChecker
, BaseChecker
):
Method | get |
DEPRECATED: Return the dictionary defining an option given its name. |
Method | level |
Undocumented |
Method | load |
DEPRECATED: Initialize the provider using default values. |
Method | option |
DEPRECATED: Get the config attribute corresponding to opt. |
Method | option |
DEPRECATED: Get the current value for the given option. |
Method | options |
DEPRECATED. |
Method | options |
DEPRECATED: Return an iterator on options grouped by section. |
Method | set |
DEPRECATED: Method called to set an option (registered in the options list). |
Class Variable | option |
Option groups of this provider and their descriptions. |
Property | config |
Undocumented |
Property | level |
Undocumented |
Instance Variable | _arguments |
The manager that will parse and register any options provided. |
Instance Variable | _level |
Undocumented |
@utils.only_required_for_messages( 'too-many-star-expressions', 'invalid-star-assignment-target')
def visit_assign(self, node:
def visit_assign(self, node:
nodes.Assign
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'not-in-loop')
def visit_break(self, node:
def visit_break(self, node:
nodes.Break
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'abstract-class-instantiated')
def visit_call(self, node:
def visit_call(self, node:
nodes.Call
):
(source)
¶
Check instantiating abstract class with abc.ABCMeta as metaclass.
@utils.only_required_for_messages( 'function-redefined')
def visit_classdef(self, node:
def visit_classdef(self, node:
nodes.ClassDef
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'not-in-loop', 'continue-in-finally')
def visit_continue(self, node:
def visit_continue(self, node:
nodes.Continue
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'useless-else-on-loop')
def visit_for(self, node:
def visit_for(self, node:
nodes.For
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'init-is-generator', 'return-in-init', 'function-redefined', 'return-arg-in-generator', 'duplicate-argument-name', 'nonlocal-and-global', 'used-prior-global-declaration')
def visit_functiondef(self, node:
def visit_functiondef(self, node:
nodes.FunctionDef
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'nonlocal-without-binding')
def visit_nonlocal(self, node:
def visit_nonlocal(self, node:
nodes.Nonlocal
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'return-outside-function')
def visit_return(self, node:
def visit_return(self, node:
nodes.Return
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'star-needs-assignment-target')
def visit_starred(self, node:
def visit_starred(self, node:
nodes.Starred
):
(source)
¶
Check that a Starred expression is used in an assignment target.
@utils.only_required_for_messages( 'nonexistent-operator')
def visit_unaryop(self, node:
def visit_unaryop(self, node:
nodes.UnaryOp
):
(source)
¶
Check use of the non-existent ++ and -- operators.
@utils.only_required_for_messages( 'useless-else-on-loop')
def visit_while(self, node:
def visit_while(self, node:
nodes.While
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'yield-outside-function')
def visit_yield(self, node:
def visit_yield(self, node:
nodes.Yield
):
(source)
¶
Undocumented
@utils.only_required_for_messages( 'yield-outside-function')
def visit_yieldfrom(self, node:
def visit_yieldfrom(self, node:
nodes.YieldFrom
):
(source)
¶
Undocumented
def _check_inferred_class_is_abstract(self, inferred:
InferenceResult
, node: nodes.Call
):
(source)
¶
Undocumented