class documentation

class BasicErrorChecker(_BasicChecker): (source)

View In Hierarchy

Undocumented

Method open Called before visiting project (i.e. set of modules).
Method visit_assign Undocumented
Method visit_break Undocumented
Method visit_call Check instantiating abstract class with abc.ABCMeta as metaclass.
Method visit_classdef Undocumented
Method visit_continue Undocumented
Method visit_for Undocumented
Method visit_functiondef Undocumented
Method visit_nonlocal Undocumented
Method visit_return Undocumented
Method visit_starred Check that a Starred expression is used in an assignment target.
Method visit_unaryop Check use of the non-existent ++ and -- operators.
Method visit_while Undocumented
Method visit_yield Undocumented
Method visit_yieldfrom Undocumented
Class Variable msgs Undocumented
Method _check_else_on_loop Check that any loop with an else clause has a break statement.
Method _check_in_loop Check that a node is inside a for or while loop.
Method _check_inferred_class_is_abstract Undocumented
Method _check_name_used_prior_global Undocumented
Method _check_nonlocal_and_global Check that a name is both nonlocal and global.
Method _check_nonlocal_without_binding Undocumented
Method _check_redefinition Check for redefinition of a function / method / class name.
Method _check_yield_outside_func Undocumented
Method _too_many_starred_for_tuple Undocumented
Instance Variable _py38_plus 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_message Undocumented
Method check_consistency Check the consistency of msgid.
Method close Called after visiting project (i.e set of modules).
Method create_message_definition_from_tuple Undocumented
Method get_full_documentation Undocumented
Method get_map_data Undocumented
Method get_message_definition Undocumented
Method reduce_map_data 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_option_def DEPRECATED: Return the dictionary defining an option given its name.
Method level.setter Undocumented
Method load_defaults DEPRECATED: Initialize the provider using default values.
Method option_attrname DEPRECATED: Get the config attribute corresponding to opt.
Method option_value DEPRECATED: Get the current value for the given option.
Method options_and_values DEPRECATED.
Method options_by_section DEPRECATED: Return an iterator on options grouped by section.
Method set_option DEPRECATED: Method called to set an option (registered in the options list).
Class Variable option_groups_descs Option groups of this provider and their descriptions.
Property config Undocumented
Property level Undocumented
Instance Variable _arguments_manager The manager that will parse and register any options provided.
Instance Variable _level Undocumented
def open(self): (source)

Called before visiting project (i.e. set of modules).

@utils.only_required_for_messages('too-many-star-expressions', 'invalid-star-assignment-target')
def visit_assign(self, node: nodes.Assign): (source)

Undocumented

@utils.only_required_for_messages('not-in-loop')
def visit_break(self, node: nodes.Break): (source)

Undocumented

@utils.only_required_for_messages('abstract-class-instantiated')
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: nodes.ClassDef): (source)

Undocumented

@utils.only_required_for_messages('not-in-loop', 'continue-in-finally')
def visit_continue(self, node: nodes.Continue): (source)

Undocumented

@utils.only_required_for_messages('useless-else-on-loop')
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: nodes.FunctionDef): (source)

Undocumented

@utils.only_required_for_messages('nonlocal-without-binding')
def visit_nonlocal(self, node: nodes.Nonlocal): (source)

Undocumented

@utils.only_required_for_messages('return-outside-function')
def visit_return(self, node: nodes.Return): (source)

Undocumented

@utils.only_required_for_messages('star-needs-assignment-target')
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: 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: nodes.While): (source)

Undocumented

@utils.only_required_for_messages('yield-outside-function')
def visit_yield(self, node: nodes.Yield): (source)

Undocumented

@utils.only_required_for_messages('yield-outside-function')
def visit_yieldfrom(self, node: nodes.YieldFrom): (source)

Undocumented

def _check_else_on_loop(self, node: nodes.For|nodes.While): (source)

Check that any loop with an else clause has a break statement.

def _check_in_loop(self, node: nodes.Continue|nodes.Break, node_name: str): (source)

Check that a node is inside a for or while loop.

def _check_inferred_class_is_abstract(self, inferred: InferenceResult, node: nodes.Call): (source)

Undocumented

def _check_name_used_prior_global(self, node: nodes.FunctionDef): (source)

Undocumented

def _check_nonlocal_and_global(self, node: nodes.FunctionDef): (source)

Check that a name is both nonlocal and global.

def _check_nonlocal_without_binding(self, node: nodes.Nonlocal, name: str): (source)

Undocumented

def _check_redefinition(self, redeftype: str, node: nodes.Call|nodes.FunctionDef): (source)

Check for redefinition of a function / method / class name.

def _check_yield_outside_func(self, node: nodes.Yield): (source)

Undocumented

def _too_many_starred_for_tuple(self, assign_tuple: nodes.Tuple) -> bool: (source)

Undocumented

_py38_plus = (source)

Undocumented