Method: pylint.checkers.base.basic_checker.BasicChecker.visit_functiondef
Calls: 3521, Exceptions: 0, Paths: 2Back
Path 1: 1805 calls (0.51)
FunctionDef (1768) AsyncFunctionDef (37)
1@utils.only_required_for_messages("dangerous-default-value")
2 def visit_functiondef(self, node: nodes.FunctionDef) -> None:
3 """Check function name, docstring, arguments, redefinition,
4 variable names, max locals.
5 """
6 if node.is_method():
7 self.linter.stats.node_count["method"] += 1
8 else:
9 self.linter.stats.node_count["function"] += 1
10 self._check_dangerous_default(node)
Path 2: 1716 calls (0.49)
FunctionDef (1699) AsyncFunctionDef (17)
1@utils.only_required_for_messages("dangerous-default-value")
2 def visit_functiondef(self, node: nodes.FunctionDef) -> None:
3 """Check function name, docstring, arguments, redefinition,
4 variable names, max locals.
5 """
6 if node.is_method():
7 self.linter.stats.node_count["method"] += 1
8 else:
9 self.linter.stats.node_count["function"] += 1
10 self._check_dangerous_default(node)