module documentation

Basic Error checker from the basic checker.

Class BasicErrorChecker No class docstring; 0/1 instance variable, 0/1 class variable, 7/24 methods documented
Function redefined_by_decorator Return True if the object is a method redefined via decorator.
Constant ABC_METACLASSES Undocumented
Constant REDEFINABLE_METHODS Undocumented
Constant TYPING_FORWARD_REF_QNAME Undocumented
Function _get_break_loop_node Returns the loop node that holds the break node in arguments.
Function _has_abstract_methods Determine if the given `node` has abstract methods.
Function _loop_exits_early Returns true if a loop may end with a break statement.
def redefined_by_decorator(node: nodes.FunctionDef) -> bool: (source)

Return True if the object is a method redefined via decorator. For example: @property def x(self): return self._x @x.setter def x(self, value): self._x = value

ABC_METACLASSES: set[str] = (source)

Undocumented

Value
set(['_py_abc.ABCMeta', 'abc.ABCMeta'])
REDEFINABLE_METHODS = (source)

Undocumented

Value
frozenset(('__module__'))
TYPING_FORWARD_REF_QNAME: str = (source)

Undocumented

Value
'typing.ForwardRef'
def _get_break_loop_node(break_node: nodes.Break) -> (nodes.For|nodes.While)|None: (source)

Returns the loop node that holds the break node in arguments. Args: break_node (astroid.Break): the break node of interest. Returns: astroid.For or astroid.While: the loop node holding the break node.

def _has_abstract_methods(node: nodes.ClassDef) -> bool: (source)

Determine if the given `node` has abstract methods. The methods should be made abstract by decorating them with `abc` decorators.

def _loop_exits_early(loop: nodes.For|nodes.While) -> bool: (source)

Returns true if a loop may end with a break statement. Args: loop (astroid.For, astroid.While): the loop node inspected. Returns: bool: True if the loop may end with a break statement, False otherwise.