fname stringlengths 63 176 | rel_fname stringclasses 706
values | line int64 -1 4.5k | name stringlengths 1 81 | kind stringclasses 2
values | category stringclasses 2
values | info stringlengths 0 77.9k ⌀ |
|---|---|---|---|---|---|---|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,744 | leave_with | def | function | def leave_with(self, node: nodes.With) -> None:
self._store_type_annotation_names(node)
def visit_arguments(self, node: nodes.Arguments) -> None:
for annotation in node.type_comment_args:
self._store_type_annotation_node(annotation)
# Relying on other checker's options, which m... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,745 | _store_type_annotation_names | ref | function | self._store_type_annotation_names(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,747 | visit_arguments | def | function | def visit_arguments(self, node: nodes.Arguments) -> None:
for annotation in node.type_comment_args:
self._store_type_annotation_node(annotation)
# Relying on other checker's options, which might not have been initialized yet.
@cached_property
def _analyse_fallback_blocks(self):
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,749 | _store_type_annotation_node | ref | function | self._store_type_annotation_node(annotation)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,753 | _analyse_fallback_blocks | def | function | def _analyse_fallback_blocks(self):
return self.linter.config.analyse_fallback_blocks
@cached_property
def _ignored_modules(self):
return self.linter.config.ignored_modules
@cached_property
def _allow_global_unused_variables(self):
return self.linter.config.allow_global_unu... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,757 | _ignored_modules | def | function | def _ignored_modules(self):
return self.linter.config.ignored_modules
@cached_property
def _allow_global_unused_variables(self):
return self.linter.config.allow_global_unused_variables
@staticmethod
def _defined_in_function_definition(node, frame):
in_annotation_or_default_... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,761 | _allow_global_unused_variables | def | function | def _allow_global_unused_variables(self):
return self.linter.config.allow_global_unused_variables
@staticmethod
def _defined_in_function_definition(node, frame):
in_annotation_or_default_or_decorator = _False
if (
isinstance(frame, nodes.FunctionDef)
and node... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,765 | _defined_in_function_definition | def | function | def _defined_in_function_definition(node, frame):
in_annotation_or_default_or_decorator = _False
if (
isinstance(frame, nodes.FunctionDef)
and node.statement(future=_True) is frame
):
in_annotation_or_default_or_decorator = (
(
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,769 | statement | ref | function | and node.statement(future=True) is frame
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,779 | parent_of | ref | function | or frame.args.parent_of(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,780 | parent_of | ref | function | or (frame.decorators and frame.decorators.parent_of(node))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,783 | parent_of | ref | function | and (node is frame.returns or frame.returns.parent_of(node))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,789 | _in_lambda_or_comprehension_body | def | function | def _in_lambda_or_comprehension_body(
node: nodes.NodeNG, frame: nodes.NodeNG
) -> bool:
"""Return _True if node within a lambda/comprehension body (or similar) and thus should not have access to class attributes in frame."""
child = node
parent = node.parent
while parent... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,815 | _is_variable_violation | def | function | def _is_variable_violation(
node: nodes.Name,
defnode,
stmt: nodes.Statement,
defstmt: nodes.Statement,
frame, # scope of statement of node
defframe,
base_scope_type,
is_recursive_klass,
) -> tuple[bool, bool, bool]:
# pylint: disable=too-... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,830 | _detect_global_scope | ref | function | maybe_before_assign = _detect_global_scope(node, frame, defframe)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,836 | builtin_lookup | ref | function | or astroid.builtin_lookup(node.name)[1]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,847 | frame | ref | function | or isinstance(node.frame(future=True), nodes.Lambda)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,848 | _assigned_locally | ref | function | ) and _assigned_locally(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,849 | root | ref | function | if not forbid_lookup and defframe.root().lookup(node.name)[1]:
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,849 | lookup | ref | function | if not forbid_lookup and defframe.root().lookup(node.name)[1]:
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,858 | get_children | ref | function | for child in defframe.get_children()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,888 | parent_of | ref | function | if node is frame.returns and defframe.parent_of(frame.returns):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,911 | parent_of | ref | function | and defframe.parent_of(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,928 | _maybe_used_and_assigned_at_once | ref | function | and VariablesChecker._maybe_used_and_assigned_at_once(defstmt)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,930 | parent_of | ref | function | and defframe.parent_of(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,942 | parent_of | ref | function | and defframe.parent_of(stmt)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,980 | as_string | ref | function | and defstmt_parent.test.as_string() in TYPING_TYPE_CHECKS_GUARDS
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 1,984 | parent_of | ref | function | used_in_branch = defstmt_parent.parent_of(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,003 | _maybe_used_and_assigned_at_once | def | function | def _maybe_used_and_assigned_at_once(defstmt: nodes.Statement) -> bool:
"""Check if `defstmt` has the potential to use and assign a name in the
same statement.
"""
if isinstance(defstmt.value, nodes.BaseContainer) and defstmt.value.elts:
# The assignment must happen as pa... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,023 | _is_only_type_assignment | def | function | def _is_only_type_assignment(
self, node: nodes.Name, defstmt: nodes.Statement
) -> bool:
"""Check if variable only gets assigned a type and never a value."""
if not isinstance(defstmt, nodes.AnnAssign) or defstmt.value:
return _False
if node.name in self.linter.conf... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,030 | is_builtin | ref | function | if node.name in self.linter.config.additional_builtins or utils.is_builtin(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,035 | frame | ref | function | defstmt_frame = defstmt.frame(future=True)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,036 | frame | ref | function | node_frame = node.frame(future=True)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,040 | scope | ref | function | parent_scope = parent.scope()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,043 | nodes_of_class | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,048 | nodes_of_class | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,051 | nodes_of_class | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,078 | _is_first_level_self_reference | def | function | def _is_first_level_self_reference(
node: nodes.Name, defstmt: nodes.ClassDef, found_nodes: list[nodes.NodeNG]
) -> tuple[VariableVisitConsumerAction, list[nodes.NodeNG] | None]:
"""Check if a first level method's annotation or default values
refers to its own class, and return a consume... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,084 | frame | ref | function | if node.frame(future=True).parent == defstmt and node.statement(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,084 | statement | ref | function | if node.frame(future=True).parent == defstmt and node.statement(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,086 | frame | ref | function | ) == node.frame(future=True):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,089 | is_node_in_type_annotation_context | ref | function | if utils.is_node_in_type_annotation_context(node):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,090 | is_postponed_evaluation_enabled | ref | function | if not utils.is_postponed_evaluation_enabled(node):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,101 | _is_never_evaluated | def | function | def _is_never_evaluated(
defnode: nodes.NamedExpr, defnode_parent: nodes.IfExp
) -> bool:
"""Check if a NamedExpr is inside a side of if ... else that never
gets evaluated.
"""
inferred_test = utils.safe_infer(defnode_parent.test)
if isinstance(inferred_test, node... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,107 | safe_infer | ref | function | inferred_test = utils.safe_infer(defnode_parent.test)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,115 | _ignore_class_scope | def | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,140 | statement | ref | function | frame = node.statement(future=True).scope()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,140 | scope | ref | function | frame = node.statement(future=True).scope()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,141 | _defined_in_function_definition | ref | function | in_annotation_or_default_or_decorator = self._defined_in_function_definition(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,144 | is_ancestor_name | ref | function | in_ancestor_list = utils.is_ancestor_name(frame, node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,146 | scope | ref | function | frame_locals = frame.parent.scope().locals
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,151 | _in_lambda_or_comprehension_body | ref | function | and not self._in_lambda_or_comprehension_body(node, frame)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,155 | _loopvar_name | def | function | def _loopvar_name(self, node: astroid.Name) -> None:
# filter variables according to node's scope
astmts = [s for s in node.lookup(node.name)[1] if hasattr(s, "assign_type")]
# If this variable usage exists inside a function definition
# that exists in the same loop,
# the us... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,157 | lookup | ref | function | astmts = [s for s in node.lookup(node.name)[1] if hasattr(s, "assign_type")]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,162 | scope | ref | function | scope = node.scope()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,167 | scope | ref | function | asmt.scope().parent_of(scope) for asmt in astmts
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,167 | parent_of | ref | function | asmt.scope().parent_of(scope) for asmt in astmts
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,181 | root | ref | function | astmts[0].parent == astmts[0].root()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,182 | parent_of | ref | function | and astmts[0].parent.parent_of(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,187 | statement | ref | function | and astmts[0].statement(future=True).parent_of(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,187 | parent_of | ref | function | and astmts[0].statement(future=True).parent_of(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,194 | statement | ref | function | if astmts[i].statement(future=True).parent_of(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,194 | parent_of | ref | function | if astmts[i].statement(future=True).parent_of(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,196 | in_for_else_branch | ref | function | ) and not utils.in_for_else_branch(astmts[i].statement(future=True), stmt):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,196 | statement | ref | function | ) and not utils.in_for_else_branch(astmts[i].statement(future=True), stmt):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,203 | assign_type | ref | function | assign = astmts[0].assign_type()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,206 | statement | ref | function | and assign.statement(future=True) is not node.statement(future=True)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,206 | statement | ref | function | and assign.statement(future=True) is not node.statement(future=True)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,211 | add_message | ref | function | self.add_message("undefined-loop-variable", args=node.name, node=node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,221 | infer | ref | function | inferred = next(assign.iter.infer())
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,223 | add_message | ref | function | self.add_message("undefined-loop-variable", args=node.name, node=node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,227 | qname | ref | function | and inferred.qname() == BUILTIN_RANGE
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,241 | add_message | ref | function | self.add_message("undefined-loop-variable", args=node.name, node=node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,246 | add_message | ref | function | self.add_message("undefined-loop-variable", args=node.name, node=node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,248 | _check_is_unused | def | function | def _check_is_unused(
self,
name,
node,
stmt,
global_names,
nonlocal_names: Iterable[str],
comprehension_target_names: list[str],
) -> None:
# Ignore some special names specified by user configuration.
if self._is_name_ignored(stmt, name):
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,258 | _is_name_ignored | ref | function | if self._is_name_ignored(stmt, name):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,272 | _import_name_is_global | ref | function | if global_names and _import_name_is_global(stmt, global_names):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,279 | argnames | ref | function | argnames = node.argnames()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,282 | _check_unused_arguments | ref | function | self._check_unused_arguments(name, node, stmt, argnames, nonlocal_names)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,303 | _has_locals_call_after_node | ref | function | if _has_locals_call_after_node(stmt, node.scope()):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,303 | scope | ref | function | if _has_locals_call_after_node(stmt, node.scope()):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,311 | add_message | ref | function | self.add_message("unused-import", args=msg, node=stmt)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,318 | add_message | ref | function | self.add_message("unused-import", args=msg, node=stmt)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,326 | is_overload_stub | ref | function | if utils.is_overload_stub(node):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,331 | nodes_of_class | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,335 | add_message | ref | function | self.add_message(message_name, args=name, node=stmt)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,337 | _is_name_ignored | def | function | def _is_name_ignored(self, stmt, name):
authorized_rgx = self.linter.config.dummy_variables_rgx
if (
isinstance(stmt, nodes.AssignName)
and isinstance(stmt.parent, nodes.Arguments)
or isinstance(stmt, nodes.Arguments)
):
regex = self.linter.con... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,349 | _check_unused_arguments | def | function | def _check_unused_arguments(
self, name, node, stmt, argnames, nonlocal_names: Iterable[str]
):
is_method = node.is_method()
klass = node.parent.frame(future=_True)
if is_method and isinstance(klass, nodes.ClassDef):
confidence = (
INFERENCE if utils.h... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,352 | is_method | ref | function | is_method = node.is_method()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,353 | frame | ref | function | klass = node.parent.frame(future=True)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,356 | has_known_bases | ref | function | INFERENCE if utils.has_known_bases(klass) else INFERENCE_FAILURE
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,366 | overridden_method | ref | function | overridden = overridden_method(klass, node.name)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,367 | argnames | ref | function | if overridden is not None and name in overridden.argnames():
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,381 | is_registered_in_singledispatch_function | ref | function | if utils.is_registered_in_singledispatch_function(node):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,385 | is_overload_stub | ref | function | if utils.is_overload_stub(node):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,389 | is_protocol_class | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,395 | add_message | ref | function | self.add_message("unused-argument", args=name, node=stmt, confidence=confidence)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,397 | _check_late_binding_closure | def | function | def _check_late_binding_closure(self, node: nodes.Name) -> None:
"""Check whether node is a cell var that is assigned within a containing loop.
Special cases where we don't care about the error:
1. When the node's function is immediately called, e.g. (lambda: i)()
2. When the node's... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,404 | is_message_enabled | ref | function | if not self.linter.is_message_enabled("cell-var-from-loop"):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py | pylint/checkers/variables.py | 2,407 | frame | ref | function | node_scope = node.frame(future=True)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.