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
1,304
add_message
ref
function
self.add_message("unnecessary-lambda", line=node.fromlineno, node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,306
check_messages
ref
function
@utils.check_messages("dangerous-default-value")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,307
visit_functiondef
def
function
def visit_functiondef(self, node: nodes.FunctionDef) -> None: self._check_nonlocal_and_global(node) self._check_name_used_prior_global(node) if not redefined_by_decorator( node ) and not utils.is_registered_in_singledispatch_function(node): self._check_redefin...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,311
is_method
ref
function
if node.is_method():
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,315
_check_dangerous_default
ref
function
self._check_dangerous_default(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,319
_check_dangerous_default
def
function
def _check_dangerous_default(self, node): """Check for dangerous default values as arguments.""" def is_iterable(internal_node): return isinstance(internal_node, (nodes.List, nodes.Set, nodes.Dict)) defaults = node.args.defaults or [] + node.args.kw_defaults or [] for d...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,322
is_iterable
def
function
def is_iterable(internal_node): return isinstance(internal_node, (nodes.List, nodes.Set, nodes.Dict)) defaults = node.args.defaults or [] + node.args.kw_defaults or [] for default in defaults: if not default: continue try: valu...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,330
infer
ref
function
value = next(default.infer())
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,336
qname
ref
function
and value.qname() in DEFAULT_ARGUMENT_SYMBOLS
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,339
qname
ref
function
msg = DEFAULT_ARGUMENT_SYMBOLS[value.qname()]
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,340
is_iterable
ref
function
elif isinstance(value, astroid.Instance) or is_iterable(value):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,348
is_iterable
ref
function
if is_iterable(default):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,349
pytype
ref
function
msg = value.pytype()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,351
qname
ref
function
msg = f"{value.name}() ({value.qname()})"
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,353
as_string
ref
function
msg = f"{default.as_string()} ({value.qname()})"
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,353
qname
ref
function
msg = f"{default.as_string()} ({value.qname()})"
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,356
as_string
ref
function
msg = f"{default.as_string()} ({DEFAULT_ARGUMENT_SYMBOLS[value.qname()]})"
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,356
qname
ref
function
msg = f"{default.as_string()} ({DEFAULT_ARGUMENT_SYMBOLS[value.qname()]})"
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,357
add_message
ref
function
self.add_message("dangerous-default-value", node=node, args=(msg,))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,359
check_messages
ref
function
@utils.check_messages("unreachable", "lost-exception")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,360
visit_return
def
function
def visit_return(self, node: nodes.Return) -> None: if not isinstance(node.frame(future=_True), nodes.FunctionDef): self.add_message("return-outside-function", node=node) @utils.check_messages("yield-outside-function") def visit_yield(self, node: nodes.Yield) -> None: self._chec...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,366
_check_unreachable
ref
function
self._check_unreachable(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,368
_check_not_in_finally
ref
function
self._check_not_in_finally(node, "return", (nodes.FunctionDef,))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,370
check_messages
ref
function
@utils.check_messages("unreachable")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,371
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
1,375
_check_unreachable
ref
function
self._check_unreachable(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,377
check_messages
ref
function
@utils.check_messages("unreachable", "lost-exception")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,378
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
1,385
_check_unreachable
ref
function
self._check_unreachable(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,387
_check_not_in_finally
ref
function
self._check_not_in_finally(node, "break", (nodes.For, nodes.While))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,389
check_messages
ref
function
@utils.check_messages("unreachable")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,390
visit_raise
def
function
def visit_raise(self, node: nodes.Raise) -> None: """Check if the node has a right sibling (if so, that's some unreachable code) """ self._check_unreachable(node) def _check_misplaced_format_function(self, call_node): if not isinstance(call_node.func, nodes.Attribute): ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,394
_check_unreachable
ref
function
self._check_unreachable(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,396
_check_misplaced_format_function
def
function
def _check_misplaced_format_function(self, call_node): if not isinstance(call_node.func, nodes.Attribute): return if call_node.func.attrname != "format": return expr = utils.safe_infer(call_node.func.expr) if expr is astroid.Uninferable: return ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,402
safe_infer
ref
function
expr = utils.safe_infer(call_node.func.expr)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,415
add_message
ref
function
self.add_message("misplaced-format-function", node=call_node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,417
check_messages
ref
function
@utils.check_messages(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,420
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
1,424
_check_misplaced_format_function
ref
function
self._check_misplaced_format_function(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,429
frame
ref
function
if not (name in node.frame(future=True) or name in node.root()):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,429
root
ref
function
if not (name in node.frame(future=True) or name in node.root()):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,431
add_message
ref
function
self.add_message("exec-used", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,433
_check_reversed
ref
function
self._check_reversed(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,435
add_message
ref
function
self.add_message("eval-used", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,437
check_messages
ref
function
@utils.check_messages("assert-on-tuple", "assert-on-string-literal")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,438
visit_assert
def
function
def visit_assert(self, node: nodes.Assert) -> None: """Check whether assert is used on a tuple or string literal.""" if ( node.fail is None and isinstance(node.test, nodes.Tuple) and len(node.test.elts) == 2 ): self.add_message("assert-on-tuple...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,445
add_message
ref
function
self.add_message("assert-on-tuple", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,452
add_message
ref
function
self.add_message("assert-on-string-literal", node=node, args=(when,))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,454
check_messages
ref
function
@utils.check_messages("duplicate-key")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,455
visit_dict
def
function
def visit_dict(self, node: nodes.Dict) -> None: """Check duplicate key in dictionary.""" keys = set() for k, _ in node.items: if isinstance(k, nodes.Const): key = k.value elif isinstance(k, nodes.Attribute): key = k.as_string() ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,462
as_string
ref
function
key = k.as_string()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,466
add_message
ref
function
self.add_message("duplicate-key", node=node, args=key)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,469
visit_tryfinally
def
function
def visit_tryfinally(self, node: nodes.TryFinally) -> None: """Update try...finally flag.""" self._tryfinallys.append(node) def leave_tryfinally(self, _: nodes.TryFinally) -> None: """Update try...finally flag.""" self._tryfinallys.pop() def _check_unreachable(self, node): ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,473
leave_tryfinally
def
function
def leave_tryfinally(self, _: nodes.TryFinally) -> None: """Update try...finally flag.""" self._tryfinallys.pop() def _check_unreachable(self, node): """Check unreachable code.""" unreach_stmt = node.next_sibling() if unreach_stmt is not None: if ( ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,477
_check_unreachable
def
function
def _check_unreachable(self, node): """Check unreachable code.""" unreach_stmt = node.next_sibling() if unreach_stmt is not None: if ( isinstance(node, nodes.Return) and isinstance(unreach_stmt, nodes.Expr) and isinstance(unreach_st...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,479
next_sibling
ref
function
unreach_stmt = node.next_sibling()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,488
next_sibling
ref
function
unreach_stmt = unreach_stmt.next_sibling()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,491
add_message
ref
function
self.add_message("unreachable", node=unreach_stmt)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,493
_check_not_in_finally
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,507
add_message
ref
function
self.add_message("lost-exception", node=node, args=node_name)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,512
_check_reversed
def
function
def _check_reversed(self, node): """Check that the argument to `reversed` is a sequence.""" try: argument = utils.safe_infer(utils.get_argument_from_call(node, position=0)) except utils.NoSuchArgumentError: pass else: if argument is astroid.Uninfer...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,515
safe_infer
ref
function
argument = utils.safe_infer(utils.get_argument_from_call(node, position=0))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,515
get_argument_from_call
ref
function
argument = utils.safe_infer(utils.get_argument_from_call(node, position=0))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,526
infer
ref
function
func = next(node.args[0].func.infer())
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,531
is_builtin_object
ref
function
) == "iter" and utils.is_builtin_object(func):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,532
add_message
ref
function
self.add_message("bad-reversed-sequence", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,543
is_builtin_object
ref
function
ancestor.name == "dict" and utils.is_builtin_object(ancestor)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,545
ancestors
ref
function
(argument._proxied,), argument._proxied.ancestors()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,551
add_message
ref
function
self.add_message("bad-reversed-sequence", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,565
add_message
ref
function
self.add_message("bad-reversed-sequence", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,567
add_message
ref
function
self.add_message("bad-reversed-sequence", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,569
check_messages
ref
function
@utils.check_messages("confusing-with-statement")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,570
visit_with
def
function
def visit_with(self, node: nodes.With) -> None: # a "with" statement with multiple managers corresponds # to one AST "With" node with multiple items pairs = node.items if pairs: for prev_pair, pair in zip(pairs, pairs[1:]): if isinstance(prev_pair[1], node...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,583
add_message
ref
function
self.add_message("confusing-with-statement", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,585
_check_self_assigning_variable
def
function
def _check_self_assigning_variable(self, node): # Detect assigning to the same variable. scope = node.scope() scope_locals = scope.locals rhs_names = [] targets = node.targets if isinstance(targets[0], nodes.Tuple): if len(targets) != 1: ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,588
scope
ref
function
scope = node.scope()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,622
add_message
ref
function
self.add_message(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,626
_check_redeclared_assign_name
def
function
def _check_redeclared_assign_name(self, targets): dummy_variables_rgx = lint_utils.get_global_option( self, "dummy-variables-rgx", default=None ) for target in targets: if not isinstance(target, nodes.Tuple): continue found_names = [] ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,627
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
1,638
_check_redeclared_assign_name
ref
function
self._check_redeclared_assign_name([element])
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,645
most_common
ref
function
for name, count in names.most_common():
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,647
add_message
ref
function
self.add_message(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,651
check_messages
ref
function
@utils.check_messages("self-assigning-variable", "redeclared-assigned-name")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,652
visit_assign
def
function
def visit_assign(self, node: nodes.Assign) -> None: # Check *a, *b = ... assign_target = node.targets[0] # Check *a = b if isinstance(node.targets[0], nodes.Starred): self.add_message("invalid-star-assignment-target", node=node) if not isinstance(assign_target, n...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,653
_check_self_assigning_variable
ref
function
self._check_self_assigning_variable(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,654
_check_redeclared_assign_name
ref
function
self._check_redeclared_assign_name(node.targets)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,656
check_messages
ref
function
@utils.check_messages("redeclared-assigned-name")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,657
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
1,658
_check_redeclared_assign_name
ref
function
self._check_redeclared_assign_name([node.target])
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,690
_create_naming_options
def
function
def _create_naming_options(): name_options = [] for name_type in sorted(KNOWN_NAME_TYPES): human_readable_name = constants.HUMAN_READABLE_TYPES[name_type] default_style = DEFAULT_NAMING_STYLES[name_type] name_type = name_type.replace("_", "-") name_options.append( ( ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,722
NameChecker
def
class
__init__ open _create_naming_rules visit_module leave_module visit_classdef visit_functiondef visit_global visit_assignname _recursive_check_names _find_name_group _raise_name_warning _name_allowed_by_regex _name_disallowed_by_regex _check_name _check_assign_to_new_keyword_violation _name_became_keyword_in_version
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,823
_create_naming_options
ref
function
) + _create_naming_options()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,838
reset_bad_names
ref
function
self.linter.stats.reset_bad_names()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,843
_create_naming_rules
ref
function
regexps, hints = self._create_naming_rules()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,853
_create_naming_rules
def
function
def _create_naming_rules(self): regexps = {} hints = {} for name_type in KNOWN_NAME_TYPES: naming_style_option_name = f"{name_type}_naming_style" naming_style_name = getattr(self.config, naming_style_option_name) regexps[name_type] = NAMING_STYLES[naming...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,861
get_regex
ref
function
regexps[name_type] = NAMING_STYLES[naming_style_name].get_regex(name_type)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,875
check_messages
ref
function
@utils.check_messages("disallowed-name", "invalid-name")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,876
visit_module
def
function
def visit_module(self, node: nodes.Module) -> None: self._check_name("module", node.name.split(".")[-1], node) self._bad_names = {} def leave_module(self, _: nodes.Module) -> None: for all_groups in self._bad_names.values(): if len(all_groups) < 2: continue ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,877
_check_name
ref
function
self._check_name("module", node.name.split(".")[-1], node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/base.py
pylint/checkers/base.py
1,880
leave_module
def
function
def leave_module(self, _: nodes.Module) -> None: for all_groups in self._bad_names.values(): if len(all_groups) < 2: continue groups = collections.defaultdict(list) min_warnings = sys.maxsize prevalent_group, _ = max(all_groups.items(), key=lam...