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/extensions/docstyle.py | pylint/extensions/docstyle.py | 47 | visit_module | def | function | def visit_module(self, node: nodes.Module) -> None:
self._check_docstring("module", node)
def visit_classdef(self, node: nodes.ClassDef) -> None:
self._check_docstring("class", node)
def visit_functiondef(self, node: nodes.FunctionDef) -> None:
ftype = "method" if node.is_method() ... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 48 | _check_docstring | ref | function | self._check_docstring("module", node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 50 | visit_classdef | def | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 51 | _check_docstring | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 53 | visit_functiondef | def | function | def visit_functiondef(self, node: nodes.FunctionDef) -> None:
ftype = "method" if node.is_method() else "function"
self._check_docstring(ftype, node)
visit_asyncfunctiondef = visit_functiondef
def _check_docstring(self, node_type, node):
docstring = node.doc
if docstring an... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 54 | is_method | ref | function | ftype = "method" if node.is_method() else "function"
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 55 | _check_docstring | ref | function | self._check_docstring(ftype, node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 59 | _check_docstring | def | function | def _check_docstring(self, node_type, node):
docstring = node.doc
if docstring and docstring[0] == "\n":
self.add_message(
"docstring-first-line-empty",
node=node,
args=(node_type,),
confidence=HIGH,
)
#... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 62 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 74 | root | ref | function | line = linecache.getline(node.root().file, lineno).lstrip()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 86 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 94 | register | def | function | def register(linter: "PyLinter") -> None:
linter.register_checker(DocStringStyleChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 95 | register_checker | ref | function | linter.register_checker(DocStringStyleChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/docstyle.py | pylint/extensions/docstyle.py | 95 | DocStringStyleChecker | ref | function | linter.register_checker(DocStringStyleChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 11 | is_line_commented | def | function | def is_line_commented(line):
"""Checks if a `# symbol that is not part of a string was found in line."""
comment_idx = line.find(b"#")
if comment_idx == -1:
return _False
if comment_part_of_string(line, comment_idx):
return is_line_commented(line[:comment_idx] + line[comment_idx + 1 :])... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 17 | comment_part_of_string | ref | function | if comment_part_of_string(line, comment_idx):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 18 | is_line_commented | ref | function | return is_line_commented(line[:comment_idx] + line[comment_idx + 1 :])
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 22 | comment_part_of_string | def | function | def comment_part_of_string(line, comment_idx):
"""Checks if the symbol at comment_idx is part of a string."""
if (
line[:comment_idx].count(b"'") % 2 == 1
and line[comment_idx:].count(b"'") % 2 == 1
) or (
line[:comment_idx].count(b'"') % 2 == 1
and line[comment_idx:].count(... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 36 | CommentChecker | def | class | process_module |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 52 | process_module | def | function | def process_module(self, node: nodes.Module) -> None:
with node.stream() as stream:
for (line_num, line) in enumerate(stream):
line = line.rstrip()
if line.endswith(b"#"):
if not is_line_commented(line[:-1]):
self.add_me... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 53 | stream | ref | function | with node.stream() as stream:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 57 | is_line_commented | ref | function | if not is_line_commented(line[:-1]):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 58 | add_message | ref | function | self.add_message("empty-comment", line=line_num + 1)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 61 | register | def | function | def register(linter: "PyLinter") -> None:
linter.register_checker(CommentChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 62 | register_checker | ref | function | linter.register_checker(CommentChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/empty_comment.py | pylint/extensions/empty_comment.py | 62 | CommentChecker | ref | function | linter.register_checker(CommentChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/emptystring.py | pylint/extensions/emptystring.py | 26 | CompareToEmptyStringChecker | def | class | visit_compare |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/emptystring.py | pylint/extensions/emptystring.py | 48 | check_messages | ref | function | @utils.check_messages("compare-to-empty-string")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/emptystring.py | pylint/extensions/emptystring.py | 49 | visit_compare | def | function | def visit_compare(self, node: nodes.Compare) -> None:
_operators = ["!=", "==", "is not", "is"]
# note: astroid.Compare has the left most operand in node.left
# while the rest are a list of tuples in node.ops
# the format of the tuple is ('compare operator sign', node)
# here... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/emptystring.py | pylint/extensions/emptystring.py | 67 | is_empty_str_literal | ref | function | if utils.is_empty_str_literal(op_1) and op_2 in _operators:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/emptystring.py | pylint/extensions/emptystring.py | 70 | is_empty_str_literal | ref | function | elif op_2 in _operators and utils.is_empty_str_literal(op_3):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/emptystring.py | pylint/extensions/emptystring.py | 74 | add_message | ref | function | self.add_message("compare-to-empty-string", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/emptystring.py | pylint/extensions/emptystring.py | 77 | register | def | function | def register(linter: "PyLinter") -> None:
linter.register_checker(CompareToEmptyStringChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/emptystring.py | pylint/extensions/emptystring.py | 78 | register_checker | ref | function | linter.register_checker(CompareToEmptyStringChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/emptystring.py | pylint/extensions/emptystring.py | 78 | CompareToEmptyStringChecker | ref | function | linter.register_checker(CompareToEmptyStringChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 13 | ConsiderUsingAnyOrAllChecker | def | class | visit_for _build_suggested_string |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 25 | check_messages | ref | function | @check_messages("consider-using-any-or-all")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 26 | visit_for | def | function | def visit_for(self, node: nodes.For) -> None:
if len(node.body) != 1: # Only If node with no Else
return
if not isinstance(node.body[0], nodes.If):
return
if_children = list(node.body[0].get_children())
if not len(if_children) == 2: # The If node has only a... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 32 | get_children | ref | function | if_children = list(node.body[0].get_children())
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 35 | returns_bool | ref | function | if not returns_bool(if_children[1]):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 39 | next_sibling | ref | function | node_after_loop = node.next_sibling()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 40 | returns_bool | ref | function | if returns_bool(node_after_loop):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 42 | _build_suggested_string | ref | function | suggested_string = self._build_suggested_string(node, final_return_bool)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 43 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 48 | _build_suggested_string | def | function | def _build_suggested_string(node: nodes.For, final_return_bool: bool) -> str:
"""When a nodes.For node can be rewritten as an any/all statement, return a suggestion for that statement
final_return_bool is the boolean literal returned after the for loop if all conditions fail
"""
loop... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 52 | as_string | ref | function | loop_var = node.target.as_string()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 53 | as_string | ref | function | loop_iter = node.iter.as_string()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 54 | get_children | ref | function | test_node = next(node.body[0].get_children())
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 63 | as_string | ref | function | test = test_node.as_string()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 67 | register | def | function | def register(linter: "PyLinter") -> None:
linter.register_checker(ConsiderUsingAnyOrAllChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 68 | register_checker | ref | function | linter.register_checker(ConsiderUsingAnyOrAllChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/for_any_all.py | pylint/extensions/for_any_all.py | 68 | ConsiderUsingAnyOrAllChecker | ref | function | linter.register_checker(ConsiderUsingAnyOrAllChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 29 | PathGraph | def | class | __init__ |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 35 | PathGraphingAstVisitor | def | class | __init__ default dispatch visitFunctionDef visitSimpleStatement visitWith _append_node _subgraph _subgraph_parse |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 40 | default | def | function | def default(self, node, *args):
for child in node.get_children():
self.dispatch(child, *args)
def dispatch(self, node, *args):
self.node = node
klass = node.__class__
meth = self._cache.get(klass)
if meth is None:
class_name = klass.__name__
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 41 | get_children | ref | function | for child in node.get_children():
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 42 | dispatch | ref | function | self.dispatch(child, *args)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 44 | dispatch | def | function | def dispatch(self, node, *args):
self.node = node
klass = node.__class__
meth = self._cache.get(klass)
if meth is None:
class_name = klass.__name__
meth = getattr(self.visitor, "visit" + class_name, self.default)
self._cache[klass] = meth
r... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 52 | meth | ref | function | return meth(node, *args)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 54 | visitFunctionDef | def | function | def visitFunctionDef(self, node):
if self.graph is not None:
# closure
pathnode = self._append_node(node)
self.tail = pathnode
self.dispatch_list(node.body)
bottom = f"{self._bottom_counter}"
self._bottom_counter += 1
self.g... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 57 | _append_node | ref | function | pathnode = self._append_node(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 59 | dispatch_list | ref | function | self.dispatch_list(node.body)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 62 | connect | ref | function | self.graph.connect(self.tail, bottom)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 63 | connect | ref | function | self.graph.connect(node, bottom)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 66 | PathGraph | ref | function | self.graph = PathGraph(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 68 | dispatch_list | ref | function | self.dispatch_list(node.body)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 70 | reset | ref | function | self.reset()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 74 | visitSimpleStatement | def | function | def visitSimpleStatement(self, node):
self._append_node(node)
visitAssert = (
visitAssign
) = (
visitAugAssign
) = (
visitDelete
) = (
visitPrint
) = (
visitRaise
) = (
visitYield
) = (
visitImport
) = (
visitCa... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 75 | _append_node | ref | function | self._append_node(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 103 | visitWith | def | function | def visitWith(self, node):
self._append_node(node)
self.dispatch_list(node.body)
visitAsyncWith = visitWith
def _append_node(self, node):
if not self.tail:
return None
self.graph.connect(self.tail, node)
self.tail = node
return node
def _sub... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 104 | _append_node | ref | function | self._append_node(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 105 | dispatch_list | ref | function | self.dispatch_list(node.body)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 109 | _append_node | def | function | def _append_node(self, node):
if not self.tail:
return None
self.graph.connect(self.tail, node)
self.tail = node
return node
def _subgraph(self, node, name, extra_blocks=()):
"""Create the subgraphs representing any `if` and `for` statements."""
if se... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 112 | connect | ref | function | self.graph.connect(self.tail, node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 116 | _subgraph | def | function | def _subgraph(self, node, name, extra_blocks=()):
"""Create the subgraphs representing any `if` and `for` statements."""
if self.graph is None:
# global loop
self.graph = PathGraph(node)
self._subgraph_parse(node, node, extra_blocks)
self.graphs[f"{sel... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 120 | PathGraph | ref | function | self.graph = PathGraph(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 121 | _subgraph_parse | ref | function | self._subgraph_parse(node, node, extra_blocks)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 123 | reset | ref | function | self.reset()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 125 | _append_node | ref | function | self._append_node(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 126 | _subgraph_parse | ref | function | self._subgraph_parse(node, node, extra_blocks)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 128 | _subgraph_parse | def | function | def _subgraph_parse(self, node, pathnode, extra_blocks):
"""Parse the body and any `else` block of `if` and `for` statements."""
loose_ends = []
self.tail = node
self.dispatch_list(node.body)
loose_ends.append(self.tail)
for extra in extra_blocks:
self.tai... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 132 | dispatch_list | ref | function | self.dispatch_list(node.body)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 136 | dispatch_list | ref | function | self.dispatch_list(extra.body)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 140 | dispatch_list | ref | function | self.dispatch_list(node.orelse)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 148 | connect | ref | function | self.graph.connect(end, bottom)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 152 | McCabeMethodChecker | def | class | visit_module |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 180 | check_messages | ref | function | @check_messages("too-complex")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 181 | visit_module | def | function | def visit_module(self, node: nodes.Module) -> None:
"""Visit an astroid.Module node to check too complex rating and
add message if is greater than max_complexity stored from options
"""
visitor = PathGraphingAstVisitor()
for child in node.body:
visitor.preorder(ch... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 185 | PathGraphingAstVisitor | ref | function | visitor = PathGraphingAstVisitor()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 187 | preorder | ref | function | visitor.preorder(child, visitor)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 189 | complexity | ref | function | complexity = graph.complexity()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 197 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 202 | register | def | function | def register(linter: "PyLinter") -> None:
linter.register_checker(McCabeMethodChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 203 | register_checker | ref | function | linter.register_checker(McCabeMethodChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/mccabe.py | pylint/extensions/mccabe.py | 203 | McCabeMethodChecker | ref | function | linter.register_checker(McCabeMethodChecker(linter))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/overlapping_exceptions.py | pylint/extensions/overlapping_exceptions.py | 18 | OverlappingExceptionsChecker | def | class | visit_tryexcept |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/overlapping_exceptions.py | pylint/extensions/overlapping_exceptions.py | 37 | check_messages | ref | function | @utils.check_messages("overlapping-except")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/overlapping_exceptions.py | pylint/extensions/overlapping_exceptions.py | 38 | visit_tryexcept | def | function | def visit_tryexcept(self, node: nodes.TryExcept) -> None:
"""Check for empty except."""
for handler in node.handlers:
if handler.type is None:
continue
if isinstance(handler.type, astroid.BoolOp):
continue
try:
excs ... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/overlapping_exceptions.py | pylint/extensions/overlapping_exceptions.py | 46 | _annotated_unpack_infer | ref | function | excs = list(_annotated_unpack_infer(handler.type))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/extensions/overlapping_exceptions.py | pylint/extensions/overlapping_exceptions.py | 54 | inherit_from_std_ex | ref | function | if isinstance(exc, astroid.Instance) and utils.inherit_from_std_ex(exc):
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.