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/stdlib.py | pylint/checkers/stdlib.py | 507 | inferred | ref | function | inferred_args = arg.inferred()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 511 | qname | ref | function | if inferred.qname() == OS_ENVIRON:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 512 | add_message | ref | function | self.add_message("shallow-copy-environ", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 515 | check_messages | ref | function | @utils.check_messages(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 530 | visit_call | def | function | def visit_call(self, node: nodes.Call) -> None:
"""Visit a Call node."""
self.check_deprecated_class_in_call(node)
for inferred in utils.infer_all(node.func):
if inferred is astroid.Uninferable:
continue
if inferred.root().name in OPEN_MODULE:
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 532 | check_deprecated_class_in_call | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 533 | infer_all | ref | function | for inferred in utils.infer_all(node.func):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 536 | root | ref | function | if inferred.root().name in OPEN_MODULE:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 541 | _check_open_mode | ref | function | self._check_open_mode(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 548 | _check_open_encoded | ref | function | self._check_open_encoded(node, inferred.root().name)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 548 | root | ref | function | self._check_open_encoded(node, inferred.root().name)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 549 | root | ref | function | elif inferred.root().name == UNITTEST_CASE:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 550 | _check_redundant_assert | ref | function | self._check_redundant_assert(node, inferred)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 552 | qname | ref | function | if inferred.qname() == THREADING_THREAD:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 553 | _check_bad_thread_instantiation | ref | function | self._check_bad_thread_instantiation(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 554 | qname | ref | function | elif inferred.qname() == SUBPROCESS_POPEN:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 555 | _check_for_preexec_fn_in_popen | ref | function | self._check_for_preexec_fn_in_popen(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 557 | qname | ref | function | name = inferred.qname()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 559 | _check_shallow_copy_environ | ref | function | self._check_shallow_copy_environ(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 561 | _check_env_function | ref | function | self._check_env_function(node, inferred)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 563 | _check_for_check_kw_in_run | ref | function | self._check_for_check_kw_in_run(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 565 | add_message | ref | function | self.add_message("forgotten-debug-statement", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 566 | check_deprecated_method | ref | function | self.check_deprecated_method(node, inferred)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 568 | check_messages | ref | function | @utils.check_messages("boolean-datetime")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 569 | visit_unaryop | def | function | def visit_unaryop(self, node: nodes.UnaryOp) -> None:
if node.op == "not":
self._check_datetime(node.operand)
@utils.check_messages("boolean-datetime")
def visit_if(self, node: nodes.If) -> None:
self._check_datetime(node.test)
@utils.check_messages("boolean-datetime")
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 571 | _check_datetime | ref | function | self._check_datetime(node.operand)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 573 | check_messages | ref | function | @utils.check_messages("boolean-datetime")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 574 | visit_if | def | function | def visit_if(self, node: nodes.If) -> None:
self._check_datetime(node.test)
@utils.check_messages("boolean-datetime")
def visit_ifexp(self, node: nodes.IfExp) -> None:
self._check_datetime(node.test)
@utils.check_messages("boolean-datetime")
def visit_boolop(self, node: nodes.BoolO... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 575 | _check_datetime | ref | function | self._check_datetime(node.test)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 577 | check_messages | ref | function | @utils.check_messages("boolean-datetime")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 578 | visit_ifexp | def | function | def visit_ifexp(self, node: nodes.IfExp) -> None:
self._check_datetime(node.test)
@utils.check_messages("boolean-datetime")
def visit_boolop(self, node: nodes.BoolOp) -> None:
for value in node.values:
self._check_datetime(value)
@utils.check_messages("lru-cache-decorating-... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 579 | _check_datetime | ref | function | self._check_datetime(node.test)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 581 | check_messages | ref | function | @utils.check_messages("boolean-datetime")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 582 | visit_boolop | def | function | def visit_boolop(self, node: nodes.BoolOp) -> None:
for value in node.values:
self._check_datetime(value)
@utils.check_messages("lru-cache-decorating-method")
def visit_functiondef(self, node: nodes.FunctionDef) -> None:
if node.decorators and isinstance(node.parent, nodes.Class... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 584 | _check_datetime | ref | function | self._check_datetime(value)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 586 | check_messages | ref | function | @utils.check_messages("lru-cache-decorating-method")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 587 | visit_functiondef | def | function | def visit_functiondef(self, node: nodes.FunctionDef) -> None:
if node.decorators and isinstance(node.parent, nodes.ClassDef):
self._check_lru_cache_decorators(node.decorators)
def _check_lru_cache_decorators(self, decorators: nodes.Decorators) -> None:
"""Check if instance methods a... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 589 | _check_lru_cache_decorators | ref | function | self._check_lru_cache_decorators(node.decorators)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 591 | _check_lru_cache_decorators | def | function | def _check_lru_cache_decorators(self, decorators: nodes.Decorators) -> None:
"""Check if instance methods are decorated with functools.lru_cache."""
lru_cache_nodes: List[nodes.NodeNG] = []
for d_node in decorators.nodes:
try:
for infered_node in d_node.infer():
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 596 | infer | ref | function | for infered_node in d_node.infer():
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 597 | qname | ref | function | q_name = infered_node.qname()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 606 | get_argument_from_call | ref | function | utils.get_argument_from_call(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 618 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 624 | _check_redundant_assert | def | function | def _check_redundant_assert(self, node, infer):
if (
isinstance(infer, astroid.BoundMethod)
and node.args
and isinstance(node.args[0], nodes.Const)
and infer.name in {"assert_True", "assert_False"}
):
self.add_message(
"redu... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 631 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 637 | _check_datetime | def | function | def _check_datetime(self, node):
"""Check that a datetime was inferred.
If so, emit boolean-datetime warning.
"""
try:
inferred = next(node.infer())
except astroid.InferenceError:
return
if (
isinstance(inferred, astroid.Instance)
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 642 | infer | ref | function | inferred = next(node.infer())
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 647 | qname | ref | function | and inferred.qname() == "datetime.time"
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 649 | add_message | ref | function | self.add_message("boolean-datetime", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 651 | _check_open_mode | def | function | def _check_open_mode(self, node):
"""Check that the mode argument of an open or file call is valid."""
try:
mode_arg = utils.get_argument_from_call(node, position=1, keyword="mode")
except utils.NoSuchArgumentError:
return
if mode_arg:
mode_arg = u... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 654 | get_argument_from_call | ref | function | mode_arg = utils.get_argument_from_call(node, position=1, keyword="mode")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 658 | safe_infer | ref | function | mode_arg = utils.safe_infer(mode_arg)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 659 | _check_mode_str | ref | function | if isinstance(mode_arg, nodes.Const) and not _check_mode_str(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 662 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 668 | _check_open_encoded | def | function | def _check_open_encoded(self, node: nodes.Call, open_module: str) -> None:
"""Check that the encoded argument of an open call is valid."""
mode_arg = None
try:
if open_module == "_io":
mode_arg = utils.get_argument_from_call(
node, position=1, ... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 673 | get_argument_from_call | ref | function | mode_arg = utils.get_argument_from_call(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 677 | get_argument_from_call | ref | function | mode_arg = utils.get_argument_from_call(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 684 | safe_infer | ref | function | mode_arg = utils.safe_infer(mode_arg)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 695 | get_argument_from_call | ref | function | encoding_arg = utils.get_argument_from_call(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 699 | get_argument_from_call | ref | function | encoding_arg = utils.get_argument_from_call(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 703 | get_argument_from_call | ref | function | encoding_arg = utils.get_argument_from_call(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 707 | get_argument_from_call | ref | function | encoding_arg = utils.get_argument_from_call(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 711 | add_message | ref | function | self.add_message("unspecified-encoding", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 714 | safe_infer | ref | function | encoding_arg = utils.safe_infer(encoding_arg)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 717 | add_message | ref | function | self.add_message("unspecified-encoding", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 719 | _check_env_function | def | function | def _check_env_function(self, node, infer):
env_name_kwarg = "key"
env_value_kwarg = "default"
if node.keywords:
kwargs = {keyword.arg: keyword.value for keyword in node.keywords}
else:
kwargs = None
if node.args:
env_name_arg = node.args[0... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 734 | _check_invalid_envvar_value | ref | function | self._check_invalid_envvar_value(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 737 | safe_infer | ref | function | call_arg=utils.safe_infer(env_name_arg),
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 750 | _check_invalid_envvar_value | ref | function | self._check_invalid_envvar_value(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 754 | safe_infer | ref | function | call_arg=utils.safe_infer(env_value_arg),
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 758 | _check_invalid_envvar_value | def | function | def _check_invalid_envvar_value(self, node, infer, message, call_arg, allow_none):
if call_arg in (astroid.Uninferable, None):
return
name = infer.qname()
if isinstance(call_arg, nodes.Const):
emit = _False
if call_arg.value is None:
emit ... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 762 | qname | ref | function | name = infer.qname()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 770 | add_message | ref | function | self.add_message(message, node=node, args=(name, call_arg.pytype()))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 770 | pytype | ref | function | self.add_message(message, node=node, args=(name, call_arg.pytype()))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 772 | add_message | ref | function | self.add_message(message, node=node, args=(name, call_arg.pytype()))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 772 | pytype | ref | function | self.add_message(message, node=node, args=(name, call_arg.pytype()))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 774 | deprecated_modules | def | function | def deprecated_modules(self):
"""Callback returning the deprecated modules."""
return self._deprecated_modules
def deprecated_methods(self):
return self._deprecated_methods
def deprecated_arguments(self, method: str):
return self._deprecated_attributes.get(method, ())
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 778 | deprecated_methods | def | function | def deprecated_methods(self):
return self._deprecated_methods
def deprecated_arguments(self, method: str):
return self._deprecated_attributes.get(method, ())
def deprecated_classes(self, module: str):
return self._deprecated_classes.get(module, ())
def deprecated_decorators(se... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 781 | deprecated_arguments | def | function | def deprecated_arguments(self, method: str):
return self._deprecated_attributes.get(method, ())
def deprecated_classes(self, module: str):
return self._deprecated_classes.get(module, ())
def deprecated_decorators(self) -> Iterable:
return self._deprecated_decorators
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 784 | deprecated_classes | def | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 787 | deprecated_decorators | def | function | def deprecated_decorators(self) -> Iterable:
return self._deprecated_decorators
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 791 | register | def | function | def register(linter: "PyLinter") -> None:
linter.register_checker(StdlibChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 792 | register_checker | ref | function | linter.register_checker(StdlibChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py | pylint/checkers/stdlib.py | 792 | StdlibChecker | ref | function | linter.register_checker(StdlibChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 227 | get_access_path | def | function | def get_access_path(key, parts):
"""Given a list of format specifiers, returns
the final access path (e.g. a.b.c[0][1]).
"""
path = []
for is_attribute, specifier in parts:
if is_attribute:
path.append(f".{specifier}")
else:
path.append(f"[{specifier!r}]")
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 240 | arg_matches_format_type | def | function | def arg_matches_format_type(arg_type, format_type):
if format_type in "sr":
# All types can be printed with %s and %r
return _True
if isinstance(arg_type, astroid.Instance):
arg_type = arg_type.pytype()
if arg_type == "builtins.str":
return format_type == "c"
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 245 | pytype | ref | function | arg_type = arg_type.pytype()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 257 | StringFormatChecker | def | class | visit_binop visit_joinedstr _check_interpolation visit_call _detect_vacuous_formatting _check_new_format _check_new_format_specifiers |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 267 | check_messages | ref | function | @check_messages(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 281 | visit_binop | def | function | def visit_binop(self, node: nodes.BinOp) -> None:
if node.op != "%":
return
left = node.left
args = node.right
if not (isinstance(left, nodes.Const) and isinstance(left.value, str)):
return
format_string = left.value
try:
(
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 296 | parse_format_string | ref | function | ) = utils.parse_format_string(format_string)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 299 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 306 | add_message | ref | function | self.add_message("truncated-format-string", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 309 | add_message | ref | function | self.add_message("format-string-without-interpolation", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 314 | add_message | ref | function | self.add_message("mixed-format-string", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 329 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 341 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 346 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 353 | safe_infer | ref | function | arg_type = utils.safe_infer(arg)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/strings.py | pylint/checkers/strings.py | 358 | arg_matches_format_type | ref | function | and not arg_matches_format_type(arg_type, format_type)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.