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/logging.py | pylint/checkers/logging.py | 204 | is_logging_name | def | function | def is_logging_name():
return (
isinstance(node.func, nodes.Attribute)
and isinstance(node.func.expr, nodes.Name)
and node.func.expr.name in self._logging_names
)
def is_logger_class():
for inferred in infer_all(node.fu... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 211 | is_logger_class | def | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 212 | infer_all | ref | function | for inferred in infer_all(node.func):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 216 | qname | ref | function | parent.qname() == "logging.Logger"
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 218 | qname | ref | function | ancestor.qname() == "logging.Logger"
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 219 | ancestors | ref | function | for ancestor in parent.ancestors()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 225 | is_logging_name | ref | function | if is_logging_name():
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 228 | is_logger_class | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 231 | _check_log_method | ref | function | self._check_log_method(node, name)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 233 | _check_log_method | def | function | def _check_log_method(self, node, name):
"""Checks calls to logging.log(level, format, *format_args)."""
if name == "log":
if node.starargs or node.kwargs or len(node.args) < 2:
# Either a malformed call, star args, or double-star args. Beyond
# the scope ... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 257 | _is_operand_literal_str | ref | function | if self._is_operand_literal_str(utils.safe_infer(operand))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 257 | safe_infer | ref | function | if self._is_operand_literal_str(utils.safe_infer(operand))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 261 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 264 | _helper_string | ref | function | args=(self._helper_string(node),),
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 267 | _check_call_func | ref | function | self._check_call_func(node.args[format_pos])
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 269 | _check_format_string | ref | function | self._check_format_string(node, format_pos)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 271 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 274 | _helper_string | ref | function | args=(self._helper_string(node),),
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 277 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 281 | is_message_enabled | ref | function | if not self.linter.is_message_enabled(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 285 | is_message_enabled | ref | function | if not self.linter.is_message_enabled(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 289 | is_message_enabled | ref | function | if not self.linter.is_message_enabled("logging-not-lazy", node.fromlineno):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 295 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 299 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 301 | safe_infer | ref | function | func = utils.safe_infer(node.func)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 306 | is_method_call | ref | function | and is_method_call(func, types, methods)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 307 | is_complex_format_str | ref | function | and not is_complex_format_str(func.bound)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 309 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 312 | _helper_string | ref | function | args=(self._helper_string(node),),
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 315 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 322 | _count_supplied_tokens | ref | function | num_args = _count_supplied_tokens(node.args[format_arg + 1 :])
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 331 | decode | ref | function | format_string = format_string.decode()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 335 | parse_format_string | ref | function | keyword_args, required_num_args, _, _ = utils.parse_format_string(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 347 | parse_format_method_string | ref | function | ) = utils.parse_format_method_string(format_string)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 357 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 364 | add_message | ref | function | self.add_message("logging-format-truncated", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 367 | add_message | ref | function | self.add_message("logging-too-many-args", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 369 | add_message | ref | function | self.add_message("logging-too-few-args", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 372 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 374 | safe_infer | ref | function | inferred = utils.safe_infer(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 380 | parse | ref | function | parsed = list(string.Formatter().parse(inferred.value))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 387 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 403 | register | def | function | def register(linter: "PyLinter") -> None:
linter.register_checker(LoggingChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 404 | register_checker | ref | function | linter.register_checker(LoggingChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 404 | LoggingChecker | ref | function | linter.register_checker(LoggingChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | 9 | MapReduceMixin | def | class | get_map_data reduce_map_data |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | 13 | get_map_data | def | function | def get_map_data(self):
"""Returns mergeable/reducible data that will be examined."""
@abc.abstractmethod
def reduce_map_data(self, linter, data):
"""For a given Checker, receives data for all mapped runs."""
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | 17 | reduce_map_data | def | function | def reduce_map_data(self, linter, data):
"""For a given Checker, receives data for all mapped runs."""
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | abc | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | MapReduceMixin | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | metaclass | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | abc | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | ABCMeta | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | @abc | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | abstractmethod | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | get_map_data | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | self | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | @abc | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | abstractmethod | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | reduce_map_data | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | self | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | linter | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/mapreduce_checker.py | pylint/checkers/mapreduce_checker.py | -1 | data | ref | function | none |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 44 | ByIdManagedMessagesChecker | def | class | _clear_by_id_managed_msgs _get_by_id_managed_msgs process_module |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 59 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 62 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 65 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 67 | _get_by_id_managed_msgs | ref | function | managed_msgs = self._get_by_id_managed_msgs()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 72 | add_message | ref | function | self.add_message("use-symbolic-message-instead", line=lineno, args=txt)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 73 | _clear_by_id_managed_msgs | ref | function | self._clear_by_id_managed_msgs()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 76 | EncodingChecker | def | class | open _check_encoding process_module process_tokens |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 129 | _check_encoding | def | function | def _check_encoding(
self, lineno: int, line: bytes, file_encoding: str
) -> Optional[str]:
try:
return line.decode(file_encoding)
except UnicodeDecodeError:
pass
except LookupError:
if (
line.startswith(b"#")
an... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 133 | decode | ref | function | return line.decode(file_encoding)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 143 | add_message | ref | function | self.add_message("syntax-error", line=lineno, args=msg)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 146 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 150 | stream | ref | function | with node.stream() as stream:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 152 | _check_encoding | ref | function | self._check_encoding(lineno + 1, line, encoding)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 154 | process_tokens | def | function | def process_tokens(self, tokens):
"""Inspect the source to find fixme problems."""
if not self.config.notes:
return
comments = (
token_info for token_info in tokens if token_info.type == tokenize.COMMENT
)
for comment in comments:
comment_t... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 172 | parse_pragma | ref | function | for p_rep in parse_pragma(disable_option_match.group(2))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 182 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 192 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 200 | register | def | function | def register(linter: "PyLinter") -> None:
linter.register_checker(EncodingChecker(linter))
linter.register_checker(ByIdManagedMessagesChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 201 | register_checker | ref | function | linter.register_checker(EncodingChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 201 | EncodingChecker | ref | function | linter.register_checker(EncodingChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 202 | register_checker | ref | function | linter.register_checker(ByIdManagedMessagesChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/misc.py | pylint/checkers/misc.py | 202 | ByIdManagedMessagesChecker | ref | function | linter.register_checker(ByIdManagedMessagesChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 18 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 53 | check_messages | ref | function | @utils.check_messages(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/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
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(
self, body_node: nodes.NodeNG, iter_obj: nodes.NodeNG
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 59 | _modified_iterating_check_on_node_and_children | ref | function | self._modified_iterating_check_on_node_and_children(body_node, iter_obj)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 61 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 65 | _modified_iterating_check | ref | function | self._modified_iterating_check(body_node, iter_obj)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 66 | get_children | ref | function | for child in body_node.get_children():
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 67 | _modified_iterating_check_on_node_and_children | ref | function | self._modified_iterating_check_on_node_and_children(child, iter_obj)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 69 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 73 | _modified_iterating_list_cond | ref | function | if self._modified_iterating_list_cond(node, iter_obj):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 75 | _modified_iterating_dict_cond | ref | function | elif self._modified_iterating_dict_cond(node, iter_obj):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 77 | _modified_iterating_set_cond | ref | function | elif self._modified_iterating_set_cond(node, iter_obj):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 80 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/modified_iterating_checker.py | pylint/checkers/modified_iterating_checker.py | 88 | _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)
)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.