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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
725
check_messages
ref
function
@utils.check_messages("yield-outside-function")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
726
visit_yield
def
function
def visit_yield(self, node: nodes.Yield) -> None: self._check_yield_outside_func(node) @utils.check_messages("yield-outside-function") def visit_yieldfrom(self, node: nodes.YieldFrom) -> None: self._check_yield_outside_func(node) @utils.check_messages("not-in-loop", "continue-in-finall...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
727
_check_yield_outside_func
ref
function
self._check_yield_outside_func(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
729
check_messages
ref
function
@utils.check_messages("yield-outside-function")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
730
visit_yieldfrom
def
function
def visit_yieldfrom(self, node: nodes.YieldFrom) -> None: self._check_yield_outside_func(node) @utils.check_messages("not-in-loop", "continue-in-finally") def visit_continue(self, node: nodes.Continue) -> None: self._check_in_loop(node, "continue") @utils.check_messages("not-in-loop") ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
731
_check_yield_outside_func
ref
function
self._check_yield_outside_func(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
733
check_messages
ref
function
@utils.check_messages("not-in-loop", "continue-in-finally")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
734
visit_continue
def
function
def visit_continue(self, node: nodes.Continue) -> None: self._check_in_loop(node, "continue") @utils.check_messages("not-in-loop") def visit_break(self, node: nodes.Break) -> None: self._check_in_loop(node, "break") @utils.check_messages("useless-else-on-loop") def visit_for(self, ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
735
_check_in_loop
ref
function
self._check_in_loop(node, "continue")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
737
check_messages
ref
function
@utils.check_messages("not-in-loop")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
738
visit_break
def
function
def visit_break(self, node: nodes.Break) -> None: self._check_in_loop(node, "break") @utils.check_messages("useless-else-on-loop") def visit_for(self, node: nodes.For) -> None: self._check_else_on_loop(node) @utils.check_messages("useless-else-on-loop") def visit_while(self, node: ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
739
_check_in_loop
ref
function
self._check_in_loop(node, "break")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
741
check_messages
ref
function
@utils.check_messages("useless-else-on-loop")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
742
visit_for
def
function
def visit_for(self, node: nodes.For) -> None: self._check_else_on_loop(node) @utils.check_messages("useless-else-on-loop") def visit_while(self, node: nodes.While) -> None: self._check_else_on_loop(node) @utils.check_messages("nonexistent-operator") def visit_unaryop(self, node: no...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
743
_check_else_on_loop
ref
function
self._check_else_on_loop(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
745
check_messages
ref
function
@utils.check_messages("useless-else-on-loop")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
746
visit_while
def
function
def visit_while(self, node: nodes.While) -> None: self._check_else_on_loop(node) @utils.check_messages("nonexistent-operator") def visit_unaryop(self, node: nodes.UnaryOp) -> None: """Check use of the non-existent ++ and -- operators.""" if ( (node.op in "+-") ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
747
_check_else_on_loop
ref
function
self._check_else_on_loop(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
749
check_messages
ref
function
@utils.check_messages("nonexistent-operator")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
750
visit_unaryop
def
function
def visit_unaryop(self, node: nodes.UnaryOp) -> None: """Check use of the non-existent ++ and -- operators.""" if ( (node.op in "+-") and isinstance(node.operand, nodes.UnaryOp) and (node.operand.op == node.op) ): self.add_message("nonexistent-...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
757
add_message
ref
function
self.add_message("nonexistent-operator", node=node, args=node.op * 2)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
759
_check_nonlocal_without_binding
def
function
def _check_nonlocal_without_binding(self, node, name): current_scope = node.scope() while _True: if current_scope.parent is None: break if not isinstance(current_scope, (nodes.ClassDef, nodes.FunctionDef)): self.add_message("nonlocal-without-b...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
760
scope
ref
function
current_scope = node.scope()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
766
add_message
ref
function
self.add_message("nonlocal-without-binding", args=(name,), node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
770
scope
ref
function
current_scope = current_scope.parent.scope()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
777
add_message
ref
function
self.add_message("nonlocal-without-binding", args=(name,), node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
779
check_messages
ref
function
@utils.check_messages("nonlocal-without-binding")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
780
visit_nonlocal
def
function
def visit_nonlocal(self, node: nodes.Nonlocal) -> None: for name in node.names: self._check_nonlocal_without_binding(node, name) @utils.check_messages("abstract-class-instantiated") def visit_call(self, node: nodes.Call) -> None: """Check instantiating abstract class with ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
782
_check_nonlocal_without_binding
ref
function
self._check_nonlocal_without_binding(node, name)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
784
check_messages
ref
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
785
visit_call
def
function
def visit_call(self, node: nodes.Call) -> None: """Check instantiating abstract class with abc.ABCMeta as metaclass. """ for inferred in infer_all(node.func): self._check_inferred_class_is_abstract(inferred, node) def _check_inferred_class_is_abstract(self, inferred,...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
789
infer_all
ref
function
for inferred in infer_all(node.func):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
790
_check_inferred_class_is_abstract
ref
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
792
_check_inferred_class_is_abstract
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
796
node_frame_class
ref
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
805
_has_abstract_methods
ref
function
abstract_methods = _has_abstract_methods(inferred)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
810
metaclass
ref
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
815
ancestors
ref
function
for ancestor in inferred.ancestors():
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
816
qname
ref
function
if ancestor.qname() == "abc.ABC":
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
817
add_message
ref
function
self.add_message(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
824
qname
ref
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
825
add_message
ref
function
self.add_message(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
829
_check_yield_outside_func
def
function
def _check_yield_outside_func(self, node): if not isinstance(node.frame(future=_True), (nodes.FunctionDef, nodes.Lambda)): self.add_message("yield-outside-function", node=node) def _check_else_on_loop(self, node): """Check that any loop with an else clause has a break statement.""" ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
830
frame
ref
function
if not isinstance(node.frame(future=True), (nodes.FunctionDef, nodes.Lambda)):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
831
add_message
ref
function
self.add_message("yield-outside-function", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
833
_check_else_on_loop
def
function
def _check_else_on_loop(self, node): """Check that any loop with an else clause has a break statement.""" if node.orelse and not _loop_exits_early(node): self.add_message( "useless-else-on-loop", node=node, # This is not optimal, but the li...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
835
_loop_exits_early
ref
function
if node.orelse and not _loop_exits_early(node):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
836
add_message
ref
function
self.add_message(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
845
_check_in_loop
def
function
def _check_in_loop(self, node, node_name): """Check that a node is inside a for or while loop.""" for parent in node.node_ancestors(): if isinstance(parent, (nodes.For, nodes.While)): if node not in parent.orelse: return if isinstance(pare...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
847
node_ancestors
ref
function
for parent in node.node_ancestors():
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
859
add_message
ref
function
self.add_message("continue-in-finally", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
861
add_message
ref
function
self.add_message("not-in-loop", node=node, args=node_name)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
863
_check_redefinition
def
function
def _check_redefinition(self, redeftype, node): """Check for redefinition of a function / method / class name.""" parent_frame = node.parent.frame(future=_True) # Ignore function stubs created for type information redefinitions = [ i for i in parent_frame.loc...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
865
frame
ref
function
parent_frame = node.parent.frame(future=True)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
874
is_overload_stub
ref
function
(local for local in redefinitions if not utils.is_overload_stub(local)),
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
877
are_exclusive
ref
function
if defined_self is not node and not astroid.are_exclusive(node, defined_self):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
887
is_overload_stub
ref
function
if utils.is_overload_stub(node):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
920
safe_infer
ref
function
inferred = utils.safe_infer(redefinition)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
924
qname
ref
function
and inferred.qname() == TYPING_FORWARD_REF_QNAME
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
928
get_global_option
ref
function
dummy_variables_rgx = lint_utils.get_global_option(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
933
add_message
ref
function
self.add_message(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
940
BasicChecker
def
class
__init__ open visit_if visit_ifexp visit_comprehension _check_using_constant_test visit_module visit_classdef visit_expr _filter_vararg _has_variadic_argument visit_lambda visit_functiondef _check_dangerous_default visit_return visit_continue visit_break visit_raise _check_misplaced_format_function visit_call visit_ass...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,092
get_global_option
ref
function
py_version = get_global_option(self, "py-version")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,095
reset_node_count
ref
function
self.linter.stats.reset_node_count()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,097
check_messages
ref
function
@utils.check_messages("using-constant-test", "missing-parentheses-for-call-in-test")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,098
visit_if
def
function
def visit_if(self, node: nodes.If) -> None: self._check_using_constant_test(node, node.test) @utils.check_messages("using-constant-test", "missing-parentheses-for-call-in-test") def visit_ifexp(self, node: nodes.IfExp) -> None: self._check_using_constant_test(node, node.test) @utils.ch...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,099
_check_using_constant_test
ref
function
self._check_using_constant_test(node, node.test)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,101
check_messages
ref
function
@utils.check_messages("using-constant-test", "missing-parentheses-for-call-in-test")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,102
visit_ifexp
def
function
def visit_ifexp(self, node: nodes.IfExp) -> None: self._check_using_constant_test(node, node.test) @utils.check_messages("using-constant-test", "missing-parentheses-for-call-in-test") def visit_comprehension(self, node: nodes.Comprehension) -> None: if node.ifs: for if_test in n...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,103
_check_using_constant_test
ref
function
self._check_using_constant_test(node, node.test)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,105
check_messages
ref
function
@utils.check_messages("using-constant-test", "missing-parentheses-for-call-in-test")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,106
visit_comprehension
def
function
def visit_comprehension(self, node: nodes.Comprehension) -> None: if node.ifs: for if_test in node.ifs: self._check_using_constant_test(node, if_test) def _check_using_constant_test(self, node, test): const_nodes = ( nodes.Module, nodes.Genera...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,109
_check_using_constant_test
ref
function
self._check_using_constant_test(node, if_test)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,111
_check_using_constant_test
def
function
def _check_using_constant_test(self, node, test): const_nodes = ( nodes.Module, nodes.GeneratorExp, nodes.Lambda, nodes.FunctionDef, nodes.ClassDef, astroid.bases.Generator, astroid.UnboundMethod, astroid.BoundMe...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,137
safe_infer
ref
function
inferred = utils.safe_infer(test)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,140
add_message
ref
function
self.add_message("using-constant-test", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,147
infer_call_result
ref
function
call_inferred = inferred.infer_call_result()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,149
infer_call_result
ref
function
call_inferred = inferred.infer_call_result(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,156
add_message
ref
function
self.add_message(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,162
add_message
ref
function
self.add_message("using-constant-test", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,164
visit_module
def
function
def visit_module(self, _: nodes.Module) -> None: """Check module name, docstring and required arguments.""" self.linter.stats.node_count["module"] += 1 def visit_classdef(self, _: nodes.ClassDef) -> None: """Check module name, docstring and redefinition increment branch counter ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,168
visit_classdef
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,174
check_messages
ref
function
@utils.check_messages(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,177
visit_expr
def
function
def visit_expr(self, node: nodes.Expr) -> None: """Check for various kind of statements without effect.""" expr = node.value if isinstance(expr, nodes.Const) and isinstance(expr.value, str): # treat string statement in a separated message # Handle PEP-257 attribute do...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,185
scope
ref
function
scope = expr.scope()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,190
previous_sibling
ref
function
sibling = expr.previous_sibling()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,193
scope
ref
function
and sibling.scope() is scope
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,197
add_message
ref
function
self.add_message("pointless-string-statement", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,213
nodes_of_class
ref
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,214
add_message
ref
function
self.add_message(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,215
as_string
ref
function
"expression-not-assigned", node=node, args=expr.as_string()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,218
add_message
ref
function
self.add_message("pointless-statement", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,221
_filter_vararg
def
function
def _filter_vararg(node, call_args): # Return the arguments for the given call which are # not passed as vararg. for arg in call_args: if isinstance(arg, nodes.Starred): if ( isinstance(arg.value, nodes.Name) and arg.value.n...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,235
_has_variadic_argument
def
function
def _has_variadic_argument(args, variadic_name): if not args: return _True for arg in args: if isinstance(arg.value, nodes.Name): if arg.value.name != variadic_name: return _True else: return _True return...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,246
check_messages
ref
function
@utils.check_messages("unnecessary-lambda")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,247
visit_lambda
def
function
def visit_lambda(self, node: nodes.Lambda) -> None: """Check whether the lambda is suspicious.""" # if the body of the lambda is a call expression with the same # argument list as the lambda itself, then the lambda is # possibly unnecessary and at least suspicious. if node.ar...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,271
from_call
ref
function
call_site = astroid.arguments.CallSite.from_call(call)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,273
_filter_vararg
ref
function
new_call_args = list(self._filter_vararg(node, call.args))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,275
_has_variadic_argument
ref
function
if self._has_variadic_argument(call.kwargs, node.args.kwarg):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,279
_has_variadic_argument
ref
function
if self._has_variadic_argument(call.starargs, node.args.vararg):