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/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 430 | has_property_type | ref | function | if self.has_property_type():
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 438 | GoogleDocstring | def | class | matching_sections has_params has_returns has_rtype has_property_returns has_property_type has_yields has_yields_type exceptions match_param_docs _first_line min_section_indent _is_section_header _parse_section |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 522 | matching_sections | def | function | def matching_sections(self) -> int:
"""Returns the number of matching docstring sections."""
return 0
def exceptions(self):
return set()
def has_params(self):
return _False
def has_returns(self):
return _False
def has_rtype(self):
return _False
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 531 | _first_line | ref | function | self.re_property_returns_line.search(self._first_line()),
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 535 | has_params | def | function | def has_params(self):
return _False
def has_returns(self):
return _False
def has_rtype(self):
return _False
def has_property_returns(self):
return _False
def has_property_type(self):
return _False
def has_yields(self):
return _False
def h... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 541 | has_returns | def | function | def has_returns(self):
return _False
def has_rtype(self):
return _False
def has_property_returns(self):
return _False
def has_property_type(self):
return _False
def has_yields(self):
return _False
def has_yields_type(self):
return _False
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 545 | _parse_section | ref | function | entries = self._parse_section(self.re_returns_section)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 551 | group | ref | function | return_desc = match.group(2)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 557 | has_rtype | def | function | def has_rtype(self):
return _False
def has_property_returns(self):
return _False
def has_property_type(self):
return _False
def has_yields(self):
return _False
def has_yields_type(self):
return _False
def match_param_docs(self):
return set(), ... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 561 | _parse_section | ref | function | entries = self._parse_section(self.re_returns_section)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 567 | group | ref | function | return_type = match.group(1)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 573 | has_property_returns | def | function | def has_property_returns(self):
return _False
def has_property_type(self):
return _False
def has_yields(self):
return _False
def has_yields_type(self):
return _False
def match_param_docs(self):
return set(), set()
def params_documented_elsewhere(self)... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 576 | _first_line | ref | function | first_line = self._first_line()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 584 | has_property_type | def | function | def has_property_type(self):
return _False
def has_yields(self):
return _False
def has_yields_type(self):
return _False
def match_param_docs(self):
return set(), set()
def params_documented_elsewhere(self):
return self.re_for_parameters_see.search(self.doc... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 588 | _first_line | ref | function | return bool(self.re_property_returns_line.match(self._first_line()))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 590 | has_yields | def | function | def has_yields(self):
return _False
def has_yields_type(self):
return _False
def match_param_docs(self):
return set(), set()
def params_documented_elsewhere(self):
return self.re_for_parameters_see.search(self.doc) is not None
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 594 | _parse_section | ref | function | entries = self._parse_section(self.re_yields_section)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 600 | group | ref | function | yield_desc = match.group(2)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 606 | has_yields_type | def | function | def has_yields_type(self):
return _False
def match_param_docs(self):
return set(), set()
def params_documented_elsewhere(self):
return self.re_for_parameters_see.search(self.doc) is not None
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 610 | _parse_section | ref | function | entries = self._parse_section(self.re_yields_section)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 616 | group | ref | function | yield_type = match.group(1)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 622 | exceptions | def | function | def exceptions(self):
return set()
def has_params(self):
return _False
def has_returns(self):
return _False
def has_rtype(self):
return _False
def has_property_returns(self):
return _False
def has_property_type(self):
return _False
def ha... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 625 | _parse_section | ref | function | entries = self._parse_section(self.re_raise_section)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 631 | group | ref | function | exc_type = match.group(1)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 632 | group | ref | function | exc_desc = match.group(2)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 634 | _split_multiple_exc_types | ref | function | types.update(_split_multiple_exc_types(exc_type))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 638 | match_param_docs | def | function | def match_param_docs(self):
return set(), set()
def params_documented_elsewhere(self):
return self.re_for_parameters_see.search(self.doc) is not None
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 642 | _parse_section | ref | function | entries = self._parse_section(self.re_param_section)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 643 | _parse_section | ref | function | entries.extend(self._parse_section(self.re_keyword_param_section))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 649 | group | ref | function | param_name = match.group(1)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 653 | group | ref | function | param_type = match.group(2)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 654 | group | ref | function | param_desc = match.group(3)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 664 | _first_line | def | function | def _first_line(self):
return self.doc.lstrip().split("\n", 1)[0]
@staticmethod
def min_section_indent(section_match):
return len(section_match.group(1)) + 1
@staticmethod
def _is_section_header(_):
# Google parsing does not need to detect section headers,
# because... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 668 | min_section_indent | def | function | def min_section_indent(section_match):
return len(section_match.group(1)) + 1
@staticmethod
def _is_section_header(_):
# Google parsing does not need to detect section headers,
# because it works off of indentation level only
return _False
def _parse_section(self, secti... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 669 | group | ref | function | return len(section_match.group(1)) + 1
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 672 | _is_section_header | def | function | def _is_section_header(_):
# Google parsing does not need to detect section headers,
# because it works off of indentation level only
return _False
def _parse_section(self, section_re):
section_match = section_re.search(self.doc)
if section_match is None:
ret... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 677 | _parse_section | def | function | def _parse_section(self, section_re):
section_match = section_re.search(self.doc)
if section_match is None:
return []
min_indentation = self.min_section_indent(section_match)
entries = []
entry = []
is_first = _True
for line in section_match.grou... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 682 | min_section_indent | ref | function | min_indentation = self.min_section_indent(section_match)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 687 | group | ref | function | for line in section_match.group(2).splitlines():
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 690 | space_indentation | ref | function | indentation = space_indentation(line)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 701 | _is_section_header | ref | function | if self._is_section_header(line):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 717 | NumpyDocstring | def | class | match_param_docs min_section_indent _is_section_header |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 771 | match_param_docs | def | function | def match_param_docs(self) -> tuple[set[str], set[str]]:
"""Matches parameter documentation section to parameter documentation rules."""
params_with_doc = set()
params_with_type = set()
entries = self._parse_section(self.re_param_section)
entries.extend(self._parse_section(s... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 776 | _parse_section | ref | function | entries = self._parse_section(self.re_param_section)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 777 | _parse_section | ref | function | entries.extend(self._parse_section(self.re_keyword_param_section))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 786 | group | ref | function | param_name = match.group(1)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 787 | group | ref | function | param_desc = match.group(2)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 790 | group | ref | function | param_name = match.group(1)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 791 | group | ref | function | param_type = match.group(3)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 792 | group | ref | function | param_desc = match.group(4)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 803 | min_section_indent | def | function | def min_section_indent(section_match):
return len(section_match.group(1)) + 1
@staticmethod
def _is_section_header(_):
# Google parsing does not need to detect section headers,
# because it works off of indentation level only
return _False
def _parse_section(self, secti... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 804 | group | ref | function | return len(section_match.group(1))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/_check_docs_utils.py | pylint/extensions/_check_docs_utils.py | 807 | _is_section_header | def | function | def _is_section_header(line):
return bool(re.match(r"\s*-+$", line))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/bad_builtin.py | pylint/extensions/bad_builtin.py | 24 | BadBuiltinChecker | def | class | visit_call |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/bad_builtin.py | pylint/extensions/bad_builtin.py | 51 | only_required_for_messages | ref | function | @only_required_for_messages("bad-builtin")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/bad_builtin.py | pylint/extensions/bad_builtin.py | 52 | visit_call | def | function | def visit_call(self, node: nodes.Call) -> None:
if isinstance(node.func, nodes.Name):
name = node.func.name
# ignore the name if it's not a builtin (i.e. not defined in the
# locals nor globals scope)
if not (name in node.frame(future=_True) or name in node.ro... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/bad_builtin.py | pylint/extensions/bad_builtin.py | 57 | frame | ref | function | if not (name in node.frame(future=True) or name in node.root()):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/bad_builtin.py | pylint/extensions/bad_builtin.py | 57 | root | ref | function | if not (name in node.frame(future=True) or name in node.root()):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/bad_builtin.py | pylint/extensions/bad_builtin.py | 61 | add_message | ref | function | self.add_message("bad-builtin", node=node, args=args)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/bad_builtin.py | pylint/extensions/bad_builtin.py | 64 | register | def | function | def register(linter: PyLinter) -> None:
linter.register_checker(BadBuiltinChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/bad_builtin.py | pylint/extensions/bad_builtin.py | 65 | register_checker | ref | function | linter.register_checker(BadBuiltinChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/bad_builtin.py | pylint/extensions/bad_builtin.py | 65 | BadBuiltinChecker | ref | function | linter.register_checker(BadBuiltinChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/broad_try_clause.py | pylint/extensions/broad_try_clause.py | 18 | BroadTryClauseChecker | def | class | _count_statements visit_tryexcept visit_tryfinally |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/broad_try_clause.py | pylint/extensions/broad_try_clause.py | 49 | _count_statements | def | function | def _count_statements(self, try_node):
statement_count = len(try_node.body)
for body_node in try_node.body:
if isinstance(body_node, (nodes.For, nodes.If, nodes.While, nodes.With)):
statement_count += self._count_statements(body_node)
return statement_count
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/broad_try_clause.py | pylint/extensions/broad_try_clause.py | 54 | _count_statements | ref | function | statement_count += self._count_statements(body_node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/broad_try_clause.py | pylint/extensions/broad_try_clause.py | 58 | visit_tryexcept | def | function | def visit_tryexcept(self, node: nodes.TryExcept | nodes.TryFinally) -> None:
try_clause_statements = self._count_statements(node)
if try_clause_statements > self.linter.config.max_try_statements:
msg = f"try clause contains {try_clause_statements} statements, expected at most {self.linte... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/broad_try_clause.py | pylint/extensions/broad_try_clause.py | 59 | _count_statements | ref | function | try_clause_statements = self._count_statements(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/broad_try_clause.py | pylint/extensions/broad_try_clause.py | 62 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/broad_try_clause.py | pylint/extensions/broad_try_clause.py | 66 | visit_tryfinally | def | function | def visit_tryfinally(self, node: nodes.TryFinally) -> None:
self.visit_tryexcept(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/broad_try_clause.py | pylint/extensions/broad_try_clause.py | 67 | visit_tryexcept | ref | function | self.visit_tryexcept(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/broad_try_clause.py | pylint/extensions/broad_try_clause.py | 70 | register | def | function | def register(linter: PyLinter) -> None:
linter.register_checker(BroadTryClauseChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/broad_try_clause.py | pylint/extensions/broad_try_clause.py | 71 | register_checker | ref | function | linter.register_checker(BroadTryClauseChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/broad_try_clause.py | pylint/extensions/broad_try_clause.py | 71 | BroadTryClauseChecker | ref | function | linter.register_checker(BroadTryClauseChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 19 | ElseifUsedChecker | def | class | __init__ _init process_tokens leave_module visit_if |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 35 | _init | ref | function | self._init()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 37 | _init | def | function | def _init(self):
self._elifs = {}
def process_tokens(self, tokens: list[TokenInfo]) -> None:
"""Process tokens and look for 'if' or 'elif'."""
self._elifs = {
begin: token for _, token, begin, _, _ in tokens if token in {"elif", "if"}
}
def leave_module(self, _:... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 40 | process_tokens | def | function | def process_tokens(self, tokens: list[TokenInfo]) -> None:
"""Process tokens and look for 'if' or 'elif'."""
self._elifs = {
begin: token for _, token, begin, _, _ in tokens if token in {"elif", "if"}
}
def leave_module(self, _: nodes.Module) -> None:
self._init()
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 46 | leave_module | def | function | def leave_module(self, _: nodes.Module) -> None:
self._init()
@only_required_for_messages("else-if-used")
def visit_if(self, node: nodes.If) -> None:
"""Current if node must directly follow an 'else'."""
if (
isinstance(node.parent, nodes.If)
and node.parent.... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 47 | _init | ref | function | self._init()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 49 | only_required_for_messages | ref | function | @only_required_for_messages("else-if-used")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 50 | visit_if | def | function | def visit_if(self, node: nodes.If) -> None:
"""Current if node must directly follow an 'else'."""
if (
isinstance(node.parent, nodes.If)
and node.parent.orelse == [node]
and (node.lineno, node.col_offset) in self._elifs
and self._elifs[(node.lineno, no... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 58 | add_message | ref | function | self.add_message("else-if-used", node=node, confidence=HIGH)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 61 | register | def | function | def register(linter: PyLinter) -> None:
linter.register_checker(ElseifUsedChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 62 | register_checker | ref | function | linter.register_checker(ElseifUsedChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/check_elif.py | pylint/extensions/check_elif.py | 62 | ElseifUsedChecker | ref | function | linter.register_checker(ElseifUsedChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 23 | CodeStyleChecker | def | class | open visit_dict visit_for visit_comprehension visit_if _check_dict_consider_namedtuple_dataclass _check_consider_using_assignment_expr _check_prev_sibling_to_if_stmt _check_ignore_assignment_expr_suggestion |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 86 | only_required_for_messages | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 87 | visit_dict | def | function | def visit_dict(self, node: nodes.Dict) -> None:
self._check_dict_consider_namedtuple_dataclass(node)
@only_required_for_messages("consider-using-tuple")
def visit_for(self, node: nodes.For) -> None:
if isinstance(node.iter, nodes.List):
self.add_message("consider-using-tuple", n... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 88 | _check_dict_consider_namedtuple_dataclass | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 90 | only_required_for_messages | ref | function | @only_required_for_messages("consider-using-tuple")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 91 | visit_for | def | function | def visit_for(self, node: nodes.For) -> None:
if isinstance(node.iter, nodes.List):
self.add_message("consider-using-tuple", node=node.iter)
@only_required_for_messages("consider-using-tuple")
def visit_comprehension(self, node: nodes.Comprehension) -> None:
if isinstance(node.i... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 93 | add_message | ref | function | self.add_message("consider-using-tuple", node=node.iter)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 95 | only_required_for_messages | ref | function | @only_required_for_messages("consider-using-tuple")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 96 | visit_comprehension | def | function | def visit_comprehension(self, node: nodes.Comprehension) -> None:
if isinstance(node.iter, nodes.List):
self.add_message("consider-using-tuple", node=node.iter)
@only_required_for_messages("consider-using-assignment-expr")
def visit_if(self, node: nodes.If) -> None:
if self._py3... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 98 | add_message | ref | function | self.add_message("consider-using-tuple", node=node.iter)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 100 | only_required_for_messages | ref | function | @only_required_for_messages("consider-using-assignment-expr")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 101 | visit_if | def | function | def visit_if(self, node: nodes.If) -> None:
if self._py38_plus:
self._check_consider_using_assignment_expr(node)
def _check_dict_consider_namedtuple_dataclass(self, node: nodes.Dict) -> None:
"""Check if dictionary values can be replaced by Namedtuple or Dataclass."""
if not... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 103 | _check_consider_using_assignment_expr | ref | function | self._check_consider_using_assignment_expr(node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 105 | _check_dict_consider_namedtuple_dataclass | def | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/extensions/code_style.py | pylint/extensions/code_style.py | 112 | is_assign_name_annotated_with | ref | function | and utils.is_assign_name_annotated_with(node.parent.target, "Final")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.