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/exceptions.py | pylint/checkers/exceptions.py | 405 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 408 | as_string | ref | function | args=(part.as_string(),),
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 411 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 414 | as_string | ref | function | args=(part.as_string(),),
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 419 | inherit_from_std_ex | ref | function | not utils.inherit_from_std_ex(exc)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 422 | has_known_bases | ref | function | if utils.has_known_bases(exc):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 423 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 427 | _check_try_except_raise | def | function | def _check_try_except_raise(self, node):
def gather_exceptions_from_handler(
handler,
) -> Optional[List[nodes.NodeNG]]:
exceptions: List[nodes.NodeNG] = []
if handler.type:
exceptions_in_handler = utils.safe_infer(handler.type)
if ... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 428 | gather_exceptions_from_handler | def | function | def gather_exceptions_from_handler(
handler,
) -> Optional[List[nodes.NodeNG]]:
exceptions: List[nodes.NodeNG] = []
if handler.type:
exceptions_in_handler = utils.safe_infer(handler.type)
if isinstance(exceptions_in_handler, nodes.Tuple... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 433 | safe_infer | ref | function | exceptions_in_handler = utils.safe_infer(handler.type)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 458 | gather_exceptions_from_handler | ref | function | excs_in_current_handler = gather_exceptions_from_handler(handler)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 465 | safe_infer | ref | function | inferred_current = utils.safe_infer(exc_in_current_handler)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 467 | is_subclass_of | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 467 | safe_infer | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 474 | _is_raising | ref | function | if _is_raising([handler.body[0]]):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 479 | gather_exceptions_from_handler | ref | function | exceptions_in_bare_handler = gather_exceptions_from_handler(handler)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 482 | add_message | ref | function | self.add_message("try-except-raise", node=handler_having_bare_raise)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 484 | check_messages | ref | function | @utils.check_messages("wrong-exception-operation")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 485 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 488 | as_string | ref | function | suggestion = f"Did you mean '({node.left.as_string()}, {node.right.as_string()})' instead?"
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 488 | as_string | ref | function | suggestion = f"Did you mean '({node.left.as_string()}, {node.right.as_string()})' instead?"
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 489 | add_message | ref | function | self.add_message("wrong-exception-operation", node=node, args=(suggestion,))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 491 | check_messages | ref | function | @utils.check_messages("wrong-exception-operation")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 492 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 495 | as_string | ref | function | suggestion = f"Did you mean '({node.left.as_string()}, {', '.join(operand.as_string() for _, operand in node.ops)})' instead?"
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 495 | as_string | ref | function | suggestion = f"Did you mean '({node.left.as_string()}, {', '.join(operand.as_string() for _, operand in node.ops)})' instead?"
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 496 | add_message | ref | function | self.add_message("wrong-exception-operation", node=node, args=(suggestion,))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 498 | check_messages | ref | function | @utils.check_messages(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 507 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 509 | _check_try_except_raise | ref | function | self._check_try_except_raise(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 514 | _is_raising | ref | function | if not _is_raising(handler.body):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 515 | add_message | ref | function | self.add_message("bare-except", node=handler)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 521 | add_message | ref | function | self.add_message("bad-except-order", node=node, args=msg)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 524 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 529 | _annotated_unpack_infer | ref | function | exceptions = list(_annotated_unpack_infer(handler.type))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 538 | inherit_from_std_ex | ref | function | ) and utils.inherit_from_std_ex(exception):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 541 | _check_catching_non_exception | ref | function | self._check_catching_non_exception(handler, exception, part)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 548 | ancestors | ref | function | for anc in exception.ancestors()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 555 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 560 | root | ref | function | and exception.root().name == utils.EXCEPTIONS_MODULE
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 561 | _is_raising | ref | function | and not _is_raising(handler.body)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 563 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 568 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 575 | register | def | function | def register(linter: "PyLinter") -> None:
linter.register_checker(ExceptionsChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 576 | register_checker | ref | function | linter.register_checker(ExceptionsChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/exceptions.py | pylint/checkers/exceptions.py | 576 | ExceptionsChecker | ref | function | linter.register_checker(ExceptionsChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 190 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 193 | token | ref | function | and tokens.token(line_end - 1) == token
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 195 | token | ref | function | and tokens.token(line_end - 2) == token
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 216 | TokenWrapper | def | class | __init__ token type start_line start_col line |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 222 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 228 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 231 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 234 | line | def | function | def line(self, idx):
return self._tokens[idx][4]
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 238 | FormatChecker | def | class | __init__ new_line process_module _check_keyword_parentheses _prepare_token_dispatcher 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 349 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 351 | _last_token_on_line_is | ref | function | if _last_token_on_line_is(tokens, line_end, ";"):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 352 | add_message | ref | function | self.add_message("unnecessary-semicolon", line=tokens.start_line(line_end))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 352 | start_line | ref | function | self.add_message("unnecessary-semicolon", line=tokens.start_line(line_end))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 354 | start_line | ref | function | line_num = tokens.start_line(line_start)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 355 | line | ref | function | line = tokens.line(line_start)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 358 | check_lines | ref | function | self.check_lines(line, line_num)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 360 | process_module | def | function | def process_module(self, _node: nodes.Module) -> None:
pass
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 bala... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 363 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 427 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 431 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 435 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 462 | _check_keyword_parentheses | ref | function | self._check_keyword_parentheses(tokens[i:], 0)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 465 | _prepare_token_dispatcher | def | function | def _prepare_token_dispatcher(self):
dispatch = {}
for tokens, handler in ((_KEYWORD_TOKENS, self._check_keyword_parentheses),):
for token in tokens:
dispatch[token] = handler
return dispatch
def process_tokens(self, tokens):
"""Process tokens and sea... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 472 | process_tokens | def | function | def process_tokens(self, tokens):
"""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_stack = [None]
indents = [0]
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 485 | _prepare_token_dispatcher | ref | function | token_handlers = self._prepare_token_dispatcher()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 495 | new_line | ref | function | self.new_line(TokenWrapper(tokens), idx - 1, idx + 1)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 495 | TokenWrapper | ref | function | self.new_line(TokenWrapper(tokens), idx - 1, idx + 1)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 497 | new_line | ref | function | self.new_line(TokenWrapper(tokens), idx - 1, idx)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 497 | TokenWrapper | ref | function | self.new_line(TokenWrapper(tokens), idx - 1, idx)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 506 | _check_line_ending | ref | function | self._check_line_ending(token, line_num)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 509 | check_indent_level | ref | function | self.check_indent_level(token, indents[-1] + 1, line_num)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 531 | check_indent_level | ref | function | self.check_indent_level(line, indents[-1], line_num)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 534 | add_message | ref | function | self.add_message("lowercase-l-suffix", line=line_num)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 541 | handler | ref | function | handler(tokens, idx)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 547 | get_message_definitions | ref | function | message_definition = self.linter.msgs_store.get_message_definitions(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 555 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 564 | add_message | ref | function | self.add_message("trailing-newlines", line=line_num)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 566 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 573 | add_message | ref | function | self.add_message("mixed-line-endings", line=line_num)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 584 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 590 | check_messages | ref | function | @check_messages("multiple-statements")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 591 | 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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 595 | root | ref | function | if not node.root().pure_python:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 597 | previous_sibling | ref | function | prev_sibl = node.previous_sibling()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 611 | statement | ref | function | prev_line = node.parent.statement(future=True).fromlineno
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 615 | _check_multi_statement_line | ref | function | self._check_multi_statement_line(node, line)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 632 | _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/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 663 | frame | ref | function | frame = node.frame(future=True)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 664 | is_overload_stub | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 664 | is_protocol_class | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 664 | node_frame_class | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 667 | add_message | ref | function | self.add_message("multiple-statements", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 670 | 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 whitespace."""
if not line.endswith("\n"):
self.add_message("missing-final-newline", line=i)
return
# exclude \f (formfeed) from the rs... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/format.py | pylint/checkers/format.py | 673 | add_message | ref | function | self.add_message("missing-final-newline", line=i)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.