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/exceptions.py | pylint/checkers/exceptions.py | 444 | _is_raising | ref | function | if _is_raising([handler.body[0]]):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 449 | gather_exceptions_from_handler | ref | function | exceptions_in_bare_handler = gather_exceptions_from_handler(handler)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 452 | add_message | ref | function | self.add_message("try-except-raise", node=handler_having_bare_raise)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 454 | only_required_for_messages | ref | function | @utils.only_required_for_messages("wrong-exception-operation")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 455 | visit_binop | def | function | def visit_binop(self, node: nodes.BinOp) -> None:
if isinstance(node.parent, nodes.ExceptHandler):
# except (V | A)
suggestion = f"Did you mean '({node.left.as_string()}, {node.right.as_string()})' instead?"
self.add_message("wrong-exception-operation", node=node, args=(s... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 458 | as_string | ref | function | suggestion = f"Did you mean '({node.left.as_string()}, {node.right.as_string()})' instead?"
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 458 | as_string | ref | function | suggestion = f"Did you mean '({node.left.as_string()}, {node.right.as_string()})' instead?"
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 459 | add_message | ref | function | self.add_message("wrong-exception-operation", node=node, args=(suggestion,))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 461 | only_required_for_messages | ref | function | @utils.only_required_for_messages("wrong-exception-operation")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 462 | visit_compare | def | function | def visit_compare(self, node: nodes.Compare) -> None:
if isinstance(node.parent, nodes.ExceptHandler):
# except (V < A)
suggestion = f"Did you mean '({node.left.as_string()}, {', '.join(operand.as_string() for _, operand in node.ops)})' instead?"
self.add_message("wrong-e... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 465 | as_string | ref | function | suggestion = f"Did you mean '({node.left.as_string()}, {', '.join(operand.as_string() for _, operand in node.ops)})' instead?"
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 465 | as_string | ref | function | suggestion = f"Did you mean '({node.left.as_string()}, {', '.join(operand.as_string() for _, operand in node.ops)})' instead?"
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 466 | add_message | ref | function | self.add_message("wrong-exception-operation", node=node, args=(suggestion,))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 468 | only_required_for_messages | ref | function | @utils.only_required_for_messages(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 477 | visit_tryexcept | def | function | def visit_tryexcept(self, node: nodes.TryExcept) -> None:
"""Check for empty except."""
self._check_try_except_raise(node)
exceptions_classes: list[Any] = []
nb_handlers = len(node.handlers)
for index, handler in enumerate(node.handlers):
if handler.type is None:
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 479 | _check_try_except_raise | ref | function | self._check_try_except_raise(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 484 | _is_raising | ref | function | if not _is_raising(handler.body):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 485 | add_message | ref | function | self.add_message("bare-except", node=handler)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 491 | add_message | ref | function | self.add_message("bad-except-order", node=node, args=msg)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 494 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 499 | _annotated_unpack_infer | ref | function | exceptions = list(_annotated_unpack_infer(handler.type))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 508 | inherit_from_std_ex | ref | function | ) and utils.inherit_from_std_ex(exception):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 511 | _check_catching_non_exception | ref | function | self._check_catching_non_exception(handler, exception, part)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 518 | ancestors | ref | function | for anc in exception.ancestors()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 525 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 530 | root | ref | function | and exception.root().name == utils.EXCEPTIONS_MODULE
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 531 | _is_raising | ref | function | and not _is_raising(handler.body)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 533 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 538 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 545 | register | def | function | def register(linter: PyLinter) -> None:
linter.register_checker(ExceptionsChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 546 | register_checker | ref | function | linter.register_checker(ExceptionsChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 546 | ExceptionsChecker | ref | function | linter.register_checker(ExceptionsChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 116 | _last_token_on_line_is | def | function | def _last_token_on_line_is(tokens, line_end, token):
return (
line_end > 0
and tokens.token(line_end - 1) == token
or line_end > 1
and tokens.token(line_end - 2) == token
and tokens.type(line_end - 1) == tokenize.COMMENT
)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 119 | token | ref | function | and tokens.token(line_end - 1) == token
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 121 | token | ref | function | and tokens.token(line_end - 2) == token
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 126 | TokenWrapper | def | class | __init__ token type start_line start_col line |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 132 | token | def | function | def token(self, idx):
return self._tokens[idx][1]
def type(self, idx):
return self._tokens[idx][0]
def start_line(self, idx):
return self._tokens[idx][2][0]
def start_col(self, idx):
return self._tokens[idx][2][1]
def line(self, idx):
return self._tokens[i... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 138 | start_line | def | function | def start_line(self, idx):
return self._tokens[idx][2][0]
def start_col(self, idx):
return self._tokens[idx][2][1]
def line(self, idx):
return self._tokens[idx][4]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 141 | start_col | def | function | def start_col(self, idx):
return self._tokens[idx][2][1]
def line(self, idx):
return self._tokens[idx][4]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 144 | line | def | function | def line(self, idx):
return self._tokens[idx][4]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 148 | FormatChecker | def | class | __init__ new_line process_module _check_keyword_parentheses process_tokens _check_line_ending visit_default _check_multi_statement_line check_line_ending check_line_length remove_pylint_option_from_lines is_line_length_check_activated specific_splitlines check_lines check_indent_level |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 259 | new_line | def | function | def new_line(self, tokens, line_end, line_start):
"""A new line has been encountered, process it if necessary."""
if _last_token_on_line_is(tokens, line_end, ";"):
self.add_message("unnecessary-semicolon", line=tokens.start_line(line_end))
line_num = tokens.start_line(line_start... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 261 | _last_token_on_line_is | ref | function | if _last_token_on_line_is(tokens, line_end, ";"):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 262 | add_message | ref | function | self.add_message("unnecessary-semicolon", line=tokens.start_line(line_end))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 262 | start_line | ref | function | self.add_message("unnecessary-semicolon", line=tokens.start_line(line_end))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 264 | start_line | ref | function | line_num = tokens.start_line(line_start)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 265 | line | ref | function | line = tokens.line(line_start)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 268 | check_lines | ref | function | self.check_lines(line, line_num)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 270 | process_module | def | function | def process_module(self, node: nodes.Module) -> None:
pass
# pylint: disable-next=too-many-return-statements
def _check_keyword_parentheses(
self, tokens: list[tokenize.TokenInfo], start: int
) -> None:
"""Check that there are not unnecessary parentheses after a keyword.
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 274 | _check_keyword_parentheses | def | function | def _check_keyword_parentheses(
self, tokens: list[tokenize.TokenInfo], start: int
) -> None:
"""Check that there are not unnecessary parentheses after a keyword.
Parens are unnecessary if there is exactly one balanced outer pair on a
line, and it is followed by a colon, and con... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 350 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 377 | _check_keyword_parentheses | ref | function | self._check_keyword_parentheses(tokens[i:], 0)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 380 | process_tokens | def | function | def process_tokens(self, tokens: list[tokenize.TokenInfo]) -> None:
"""Process tokens and search for :
_ too long lines (i.e. longer than <max_chars>)
_ optionally bad construct (if given, bad_construct must be a compiled
regular expression).
"""
self._bracket_stac... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 402 | new_line | ref | function | self.new_line(TokenWrapper(tokens), idx - 1, idx + 1)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 402 | TokenWrapper | ref | function | self.new_line(TokenWrapper(tokens), idx - 1, idx + 1)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 404 | new_line | ref | function | self.new_line(TokenWrapper(tokens), idx - 1, idx)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 404 | TokenWrapper | ref | function | self.new_line(TokenWrapper(tokens), idx - 1, idx)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 413 | _check_line_ending | ref | function | self._check_line_ending(token, line_num)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 416 | check_indent_level | ref | function | self.check_indent_level(token, indents[-1] + 1, line_num)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 438 | check_indent_level | ref | function | self.check_indent_level(line, indents[-1], line_num)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 441 | add_message | ref | function | self.add_message("lowercase-l-suffix", line=line_num)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 444 | _check_keyword_parentheses | ref | function | self._check_keyword_parentheses(tokens, idx)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 450 | get_message_definitions | ref | function | message_definition = self.linter.msgs_store.get_message_definitions(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 458 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 467 | add_message | ref | function | self.add_message("trailing-newlines", line=line_num)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 469 | _check_line_ending | def | function | def _check_line_ending(self, line_ending, line_num):
# check if line endings are mixed
if self._last_line_ending is not None:
# line_ending == "" indicates a synthetic newline added at
# the end of a file that does not, in fact, end with a
# newline.
i... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 476 | add_message | ref | function | self.add_message("mixed-line-endings", line=line_num)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 487 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 493 | only_required_for_messages | ref | function | @only_required_for_messages("multiple-statements")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 494 | visit_default | def | function | def visit_default(self, node: nodes.NodeNG) -> None:
"""Check the node line number and check it if not yet done."""
if not node.is_statement:
return
if not node.root().pure_python:
return
prev_sibl = node.previous_sibling()
if prev_sibl is not None:
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 498 | root | ref | function | if not node.root().pure_python:
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 500 | previous_sibling | ref | function | prev_sibl = node.previous_sibling()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 514 | statement | ref | function | prev_line = node.parent.statement(future=True).fromlineno
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 518 | _check_multi_statement_line | ref | function | self._check_multi_statement_line(node, line)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 535 | _check_multi_statement_line | def | function | def _check_multi_statement_line(self, node, line):
"""Check for lines containing multiple statements."""
# Do not warn about multiple nested context managers
# in with statements.
if isinstance(node, nodes.With):
return
# For try... except... finally..., the two n... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 566 | frame | ref | function | frame = node.frame(future=True)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 567 | is_overload_stub | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 567 | is_protocol_class | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 567 | node_frame_class | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 570 | add_message | ref | function | self.add_message("multiple-statements", node=node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 573 | check_line_ending | def | function | def check_line_ending(self, line: str, i: int) -> None:
"""Check that the final newline is not missing and that there is no trailing white-space."""
if not line.endswith("\n"):
self.add_message("missing-final-newline", line=i)
return
# exclude \f (formfeed) from the r... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 576 | add_message | ref | function | self.add_message("missing-final-newline", line=i)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 581 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 585 | check_line_length | def | function | def check_line_length(self, line: str, i: int, checker_off: bool) -> None:
"""Check that the line length is less than the authorized value."""
max_chars = self.linter.config.max_line_length
ignore_long_line = self.linter.config.ignore_long_lines
line = line.rstrip()
if len(li... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 590 | search | ref | function | if len(line) > max_chars and not ignore_long_line.search(line):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 592 | add_ignored_message | ref | function | self.linter.add_ignored_message("line-too-long", i)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 594 | add_message | ref | function | self.add_message("line-too-long", line=i, args=(len(line), max_chars))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 597 | remove_pylint_option_from_lines | def | function | def remove_pylint_option_from_lines(options_pattern_obj) -> str:
"""Remove the `# pylint ...` pattern from lines."""
lines = options_pattern_obj.string
purged_lines = (
lines[: options_pattern_obj.start(1)].rstrip()
+ lines[options_pattern_obj.end(1) :]
)
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 601 | start | ref | function | lines[: options_pattern_obj.start(1)].rstrip()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 602 | end | ref | function | + lines[options_pattern_obj.end(1) :]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 607 | is_line_length_check_activated | def | function | def is_line_length_check_activated(pylint_pattern_match_object) -> bool:
"""Return true if the line length check is activated."""
try:
for pragma in parse_pragma(pylint_pattern_match_object.group(2)):
if pragma.action == "disable" and "line-too-long" in pragma.messages:
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 610 | parse_pragma | ref | function | for pragma in parse_pragma(pylint_pattern_match_object.group(2)):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 619 | specific_splitlines | def | function | def specific_splitlines(lines: str) -> list[str]:
"""Split lines according to universal newlines except those in a specific sets."""
unsplit_ends = {
"\x0b", # synonym of \v
"\x0c", # synonym of \f
"\x1c",
"\x1d",
"\x1e",
"\x8... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 641 | check_lines | def | function | def check_lines(self, lines: str, lineno: int) -> None:
"""Check given lines for potential messages.
Check lines have :
- a final newline
- no trailing white-space
- less than a maximum number of characters
"""
# we're first going to do a rough check whether ... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 659 | specific_splitlines | ref | function | split_lines = self.specific_splitlines(lines)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 662 | check_line_ending | ref | function | self.check_line_ending(line, lineno + offset)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 680 | search | ref | function | mobj = OPTION_PO.search(lines)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 683 | is_line_length_check_activated | ref | function | if not self.is_line_length_check_activated(mobj):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 686 | remove_pylint_option_from_lines | ref | function | lines = self.remove_pylint_option_from_lines(mobj)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 689 | specific_splitlines | ref | function | for offset, line in enumerate(self.specific_splitlines(lines)):
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.