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/logging.py | pylint/checkers/logging.py | 260 | _helper_string | def | function | def _helper_string(self, node):
"""Create a string that lists the valid types of formatting for this node."""
valid_types = ["lazy %"]
if not self.linter.is_message_enabled(
"logging-fstring-formatting", node.fromlineno
):
valid_types.append("fstring")
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 264 | is_message_enabled | ref | function | if not self.linter.is_message_enabled(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 268 | is_message_enabled | ref | function | if not self.linter.is_message_enabled(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 272 | is_message_enabled | ref | function | if not self.linter.is_message_enabled("logging-not-lazy", node.fromlineno):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 278 | _is_operand_literal_str | def | function | def _is_operand_literal_str(operand):
"""Return _True if the operand in argument is a literal string."""
return isinstance(operand, nodes.Const) and operand.name == "str"
def _check_call_func(self, node: nodes.Call):
"""Checks that function call is not format_string.format()."""
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 282 | _check_call_func | def | function | def _check_call_func(self, node: nodes.Call):
"""Checks that function call is not format_string.format()."""
func = utils.safe_infer(node.func)
types = ("str", "unicode")
methods = ("format",)
if (
isinstance(func, astroid.BoundMethod)
and is_method_ca... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 284 | safe_infer | ref | function | func = utils.safe_infer(node.func)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 289 | is_method_call | ref | function | and is_method_call(func, types, methods)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 290 | is_complex_format_str | ref | function | and not is_complex_format_str(func.bound)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 292 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 295 | _helper_string | ref | function | args=(self._helper_string(node),),
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 298 | _check_format_string | def | function | def _check_format_string(self, node, format_arg):
"""Checks that format string tokens match the supplied arguments.
Args:
node (nodes.NodeNG): AST node to be checked.
format_arg (int): Index of the format string in the node arguments.
"""
num_args = _count_suppli... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 305 | _count_supplied_tokens | ref | function | num_args = _count_supplied_tokens(node.args[format_arg + 1 :])
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 314 | decode | ref | function | format_string = format_string.decode()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 318 | parse_format_string | ref | function | keyword_args, required_num_args, _, _ = utils.parse_format_string(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 330 | parse_format_method_string | ref | function | ) = utils.parse_format_method_string(format_string)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 340 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 347 | add_message | ref | function | self.add_message("logging-format-truncated", node=node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 350 | add_message | ref | function | self.add_message("logging-too-many-args", node=node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 352 | add_message | ref | function | self.add_message("logging-too-few-args", node=node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 355 | is_complex_format_str | def | function | def is_complex_format_str(node: nodes.NodeNG) -> bool:
"""Return whether the node represents a string with complex formatting specs."""
inferred = utils.safe_infer(node)
if inferred is None or not (
isinstance(inferred, nodes.Const) and isinstance(inferred.value, str)
):
return _True
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 357 | safe_infer | ref | function | inferred = utils.safe_infer(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 363 | parse | ref | function | parsed = list(string.Formatter().parse(inferred.value))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 370 | _count_supplied_tokens | def | function | def _count_supplied_tokens(args):
"""Counts the number of tokens in an args list.
The Python log functions allow for special keyword arguments: func,
exc_info and extra. To handle these cases correctly, we only count
arguments that aren't keywords.
Args:
args (list): AST nodes that are argum... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 386 | register | def | function | def register(linter: PyLinter) -> None:
linter.register_checker(LoggingChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 387 | register_checker | ref | function | linter.register_checker(LoggingChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 387 | LoggingChecker | ref | function | linter.register_checker(LoggingChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | 14 | MapReduceMixin | def | class | __init__ get_map_data reduce_map_data |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | 25 | get_map_data | def | function | def get_map_data(self) -> Any:
"""Returns merge-able/reducible data that will be examined."""
@abc.abstractmethod
def reduce_map_data(self, linter: PyLinter, data: list[Any]) -> None:
"""For a given Checker, receives data for all mapped runs."""
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | 29 | reduce_map_data | def | function | def reduce_map_data(self, linter: PyLinter, data: list[Any]) -> None:
"""For a given Checker, receives data for all mapped runs."""
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 22 | ByIdManagedMessagesChecker | def | class | _clear_by_id_managed_msgs _get_by_id_managed_msgs process_module |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 36 | _clear_by_id_managed_msgs | def | function | def _clear_by_id_managed_msgs(self) -> None:
self.linter._by_id_managed_msgs.clear()
def _get_by_id_managed_msgs(self) -> list[ManagedMessage]:
return self.linter._by_id_managed_msgs
def process_module(self, node: nodes.Module) -> None:
"""Inspect the source file to find messages a... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 39 | _get_by_id_managed_msgs | def | function | def _get_by_id_managed_msgs(self) -> list[ManagedMessage]:
return self.linter._by_id_managed_msgs
def process_module(self, node: nodes.Module) -> None:
"""Inspect the source file to find messages activated or deactivated by id."""
managed_msgs = self._get_by_id_managed_msgs()
fo... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 42 | process_module | def | function | def process_module(self, node: nodes.Module) -> None:
"""Inspect the source file to find messages activated or deactivated by id."""
managed_msgs = self._get_by_id_managed_msgs()
for (mod_name, msgid, symbol, lineno, is_disabled) in managed_msgs:
if mod_name == node.name:
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 44 | _get_by_id_managed_msgs | ref | function | managed_msgs = self._get_by_id_managed_msgs()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 49 | add_message | ref | function | self.add_message("use-symbolic-message-instead", line=lineno, args=txt)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 50 | _clear_by_id_managed_msgs | ref | function | self._clear_by_id_managed_msgs()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 53 | EncodingChecker | def | class | open _check_encoding process_module process_tokens |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 107 | _check_encoding | def | function | def _check_encoding(
self, lineno: int, line: bytes, file_encoding: str
) -> str | None:
try:
return line.decode(file_encoding)
except UnicodeDecodeError:
pass
except LookupError:
if (
line.startswith(b"#")
and "... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 111 | decode | ref | function | return line.decode(file_encoding)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 121 | add_message | ref | function | self.add_message("syntax-error", line=lineno, args=msg)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 124 | process_module | def | function | def process_module(self, node: nodes.Module) -> None:
"""Inspect the source file to find messages activated or deactivated by id."""
managed_msgs = self._get_by_id_managed_msgs()
for (mod_name, msgid, symbol, lineno, is_disabled) in managed_msgs:
if mod_name == node.name:
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 128 | stream | ref | function | with node.stream() as stream:
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 130 | _check_encoding | ref | function | self._check_encoding(lineno + 1, line, encoding)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 132 | process_tokens | def | function | def process_tokens(self, tokens: list[tokenize.TokenInfo]) -> None:
"""Inspect the source to find fixme problems."""
if not self.linter.config.notes:
return
comments = (
token_info for token_info in tokens if token_info.type == tokenize.COMMENT
)
for c... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 150 | parse_pragma | ref | function | for p_rep in parse_pragma(disable_option_match.group(2))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 158 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 164 | add_ignored_message | ref | function | self.linter.add_ignored_message("fixme", line=comment.start[0])
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 170 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 178 | register | def | function | def register(linter: PyLinter) -> None:
linter.register_checker(EncodingChecker(linter))
linter.register_checker(ByIdManagedMessagesChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 179 | register_checker | ref | function | linter.register_checker(EncodingChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 179 | EncodingChecker | ref | function | linter.register_checker(EncodingChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 180 | register_checker | ref | function | linter.register_checker(ByIdManagedMessagesChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 180 | ByIdManagedMessagesChecker | ref | function | linter.register_checker(ByIdManagedMessagesChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 21 | ModifiedIterationChecker | def | class | visit_for _modified_iterating_check_on_node_and_children _modified_iterating_check _is_node_expr_that_calls_attribute_name _common_cond_list_set _is_node_assigns_subscript_name _modified_iterating_list_cond _modified_iterating_dict_cond _modified_iterating_set_cond |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 53 | only_required_for_messages | ref | function | @utils.only_required_for_messages(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 56 | visit_for | def | function | def visit_for(self, node: nodes.For) -> None:
iter_obj = node.iter
if isinstance(iter_obj, nodes.Name):
for body_node in node.body:
self._modified_iterating_check_on_node_and_children(body_node, iter_obj)
def _modified_iterating_check_on_node_and_children(
se... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 60 | _modified_iterating_check_on_node_and_children | ref | function | self._modified_iterating_check_on_node_and_children(body_node, iter_obj)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 62 | _modified_iterating_check_on_node_and_children | def | function | def _modified_iterating_check_on_node_and_children(
self, body_node: nodes.NodeNG, iter_obj: nodes.NodeNG
) -> None:
"""See if node or any of its children raises modified iterating messages."""
self._modified_iterating_check(body_node, iter_obj)
for child in body_node.get_childre... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 66 | _modified_iterating_check | ref | function | self._modified_iterating_check(body_node, iter_obj)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 67 | get_children | ref | function | for child in body_node.get_children():
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 68 | _modified_iterating_check_on_node_and_children | ref | function | self._modified_iterating_check_on_node_and_children(child, iter_obj)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 70 | _modified_iterating_check | def | function | def _modified_iterating_check(
self, node: nodes.NodeNG, iter_obj: nodes.NodeNG
) -> None:
msg_id = None
if self._modified_iterating_list_cond(node, iter_obj):
msg_id = "modified-iterating-list"
elif self._modified_iterating_dict_cond(node, iter_obj):
msg_... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 74 | _modified_iterating_list_cond | ref | function | if self._modified_iterating_list_cond(node, iter_obj):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 76 | _modified_iterating_dict_cond | ref | function | elif self._modified_iterating_dict_cond(node, iter_obj):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 78 | _modified_iterating_set_cond | ref | function | elif self._modified_iterating_set_cond(node, iter_obj):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 81 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 89 | _is_node_expr_that_calls_attribute_name | def | function | def _is_node_expr_that_calls_attribute_name(node: nodes.NodeNG) -> bool:
return (
isinstance(node, nodes.Expr)
and isinstance(node.value, nodes.Call)
and isinstance(node.value.func, nodes.Attribute)
and isinstance(node.value.func.expr, nodes.Name)
)
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 98 | _common_cond_list_set | def | function | def _common_cond_list_set(
node: nodes.Expr,
iter_obj: nodes.NodeNG,
infer_val: nodes.List | nodes.Set,
) -> bool:
return (infer_val == utils.safe_infer(iter_obj)) and (
node.value.func.expr.name == iter_obj.name
)
@staticmethod
def _is_node_assigns_s... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 103 | safe_infer | ref | function | return (infer_val == utils.safe_infer(iter_obj)) and (
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 108 | _is_node_assigns_subscript_name | def | function | def _is_node_assigns_subscript_name(node: nodes.NodeNG) -> bool:
return isinstance(node, nodes.Assign) and (
isinstance(node.targets[0], nodes.Subscript)
and (isinstance(node.targets[0].value, nodes.Name))
)
def _modified_iterating_list_cond(
self, node: nodes.No... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 114 | _modified_iterating_list_cond | def | function | def _modified_iterating_list_cond(
self, node: nodes.NodeNG, iter_obj: nodes.NodeNG
) -> bool:
if not self._is_node_expr_that_calls_attribute_name(node):
return _False
infer_val = utils.safe_infer(node.value.func.expr)
if not isinstance(infer_val, nodes.List):
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 117 | _is_node_expr_that_calls_attribute_name | ref | function | if not self._is_node_expr_that_calls_attribute_name(node):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 119 | safe_infer | ref | function | infer_val = utils.safe_infer(node.value.func.expr)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 123 | _common_cond_list_set | ref | function | self._common_cond_list_set(node, iter_obj, infer_val)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 127 | _modified_iterating_dict_cond | def | function | def _modified_iterating_dict_cond(
self, node: nodes.NodeNG, iter_obj: nodes.NodeNG
) -> bool:
if not self._is_node_assigns_subscript_name(node):
return _False
infer_val = utils.safe_infer(node.targets[0].value)
if not isinstance(infer_val, nodes.Dict):
re... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 130 | _is_node_assigns_subscript_name | ref | function | if not self._is_node_assigns_subscript_name(node):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 132 | safe_infer | ref | function | infer_val = utils.safe_infer(node.targets[0].value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 135 | safe_infer | ref | function | if infer_val != utils.safe_infer(iter_obj):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 139 | _modified_iterating_set_cond | def | function | def _modified_iterating_set_cond(
self, node: nodes.NodeNG, iter_obj: nodes.NodeNG
) -> bool:
if not self._is_node_expr_that_calls_attribute_name(node):
return _False
infer_val = utils.safe_infer(node.value.func.expr)
if not isinstance(infer_val, nodes.Set):
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 142 | _is_node_expr_that_calls_attribute_name | ref | function | if not self._is_node_expr_that_calls_attribute_name(node):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 144 | safe_infer | ref | function | infer_val = utils.safe_infer(node.value.func.expr)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 148 | _common_cond_list_set | ref | function | self._common_cond_list_set(node, iter_obj, infer_val)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 153 | register | def | function | def register(linter: PyLinter) -> None:
linter.register_checker(ModifiedIterationChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 154 | register_checker | ref | function | linter.register_checker(ModifiedIterationChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 154 | ModifiedIterationChecker | ref | function | linter.register_checker(ModifiedIterationChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 34 | NewStyleConflictChecker | def | class | visit_functiondef |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 49 | only_required_for_messages | ref | function | @only_required_for_messages("bad-super-call")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 50 | visit_functiondef | def | function | def visit_functiondef(self, node: nodes.FunctionDef) -> None:
"""Check use of super."""
# ignore actual functions or method within a new style class
if not node.is_method():
return
klass = node.parent.frame(future=_True)
for stmt in node.nodes_of_class(nodes.Call)... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 53 | is_method | ref | function | if not node.is_method():
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 55 | frame | ref | function | klass = node.parent.frame(future=True)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 56 | nodes_of_class | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 57 | node_frame_class | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 57 | node_frame_class | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 75 | has_known_bases | ref | function | if klass.newstyle or not has_known_bases(klass):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 88 | add_message | ref | function | self.add_message("bad-super-call", node=call, args=("type",))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 100 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 106 | infer | ref | function | supcls = call.args and next(call.args[0].infer(), None)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 120 | add_message | ref | function | self.add_message("bad-super-call", node=call, args=(name,))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/newstyle.py | pylint/checkers/newstyle.py | 125 | register | def | function | def register(linter: PyLinter) -> None:
linter.register_checker(NewStyleConflictChecker(linter))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.