Method: pylint.checkers.classes.class_checker.ClassChecker._check_super_without_brackets
Calls: 3223, Exceptions: 0, Paths: 6Back
Path 1: 1447 calls (0.45)
Attribute (1447)
None (1447)
1def _check_super_without_brackets(self, node: nodes.Attribute) -> None:
2 """Check if there is a function call on a super call without brackets."""
3 # Check if attribute call is in frame definition in class definition
4 frame = node.frame()
5 if not isinstance(frame, nodes.FunctionDef):
6 return
7 if not isinstance(frame.parent.frame(), nodes.ClassDef):
8 return
9 if not isinstance(node.parent, nodes.Call):
10 return
11 if not isinstance(node.expr, nodes.Name):
12 return
13 if node.expr.name == "super":
14 self.add_message("super-without-brackets", node=node.expr, confidence=HIGH)
Path 2: 930 calls (0.29)
Attribute (930)
None (930)
1def _check_super_without_brackets(self, node: nodes.Attribute) -> None:
2 """Check if there is a function call on a super call without brackets."""
3 # Check if attribute call is in frame definition in class definition
4 frame = node.frame()
5 if not isinstance(frame, nodes.FunctionDef):
6 return
7 if not isinstance(frame.parent.frame(), nodes.ClassDef):
8 return
9 if not isinstance(node.parent, nodes.Call):
10 return
11 if not isinstance(node.expr, nodes.Name):
12 return
13 if node.expr.name == "super":
14 self.add_message("super-without-brackets", node=node.expr, confidence=HIGH)
Path 3: 389 calls (0.12)
Attribute (389)
None (389)
1def _check_super_without_brackets(self, node: nodes.Attribute) -> None:
2 """Check if there is a function call on a super call without brackets."""
3 # Check if attribute call is in frame definition in class definition
4 frame = node.frame()
5 if not isinstance(frame, nodes.FunctionDef):
6 return
7 if not isinstance(frame.parent.frame(), nodes.ClassDef):
8 return
9 if not isinstance(node.parent, nodes.Call):
10 return
11 if not isinstance(node.expr, nodes.Name):
12 return
13 if node.expr.name == "super":
14 self.add_message("super-without-brackets", node=node.expr, confidence=HIGH)
Path 4: 233 calls (0.07)
Attribute (233)
1def _check_super_without_brackets(self, node: nodes.Attribute) -> None:
2 """Check if there is a function call on a super call without brackets."""
3 # Check if attribute call is in frame definition in class definition
4 frame = node.frame()
5 if not isinstance(frame, nodes.FunctionDef):
6 return
7 if not isinstance(frame.parent.frame(), nodes.ClassDef):
8 return
9 if not isinstance(node.parent, nodes.Call):
10 return
11 if not isinstance(node.expr, nodes.Name):
12 return
13 if node.expr.name == "super":
14 self.add_message("super-without-brackets", node=node.expr, confidence=HIGH)
Path 5: 223 calls (0.07)
Attribute (223)
None (223)
1def _check_super_without_brackets(self, node: nodes.Attribute) -> None:
2 """Check if there is a function call on a super call without brackets."""
3 # Check if attribute call is in frame definition in class definition
4 frame = node.frame()
5 if not isinstance(frame, nodes.FunctionDef):
6 return
7 if not isinstance(frame.parent.frame(), nodes.ClassDef):
8 return
9 if not isinstance(node.parent, nodes.Call):
10 return
11 if not isinstance(node.expr, nodes.Name):
12 return
13 if node.expr.name == "super":
14 self.add_message("super-without-brackets", node=node.expr, confidence=HIGH)
Path 6: 1 calls (0.0)
Attribute (1)
1def _check_super_without_brackets(self, node: nodes.Attribute) -> None:
2 """Check if there is a function call on a super call without brackets."""
3 # Check if attribute call is in frame definition in class definition
4 frame = node.frame()
5 if not isinstance(frame, nodes.FunctionDef):
6 return
7 if not isinstance(frame.parent.frame(), nodes.ClassDef):
8 return
9 if not isinstance(node.parent, nodes.Call):
10 return
11 if not isinstance(node.expr, nodes.Name):
12 return
13 if node.expr.name == "super":
14 self.add_message("super-without-brackets", node=node.expr, confidence=HIGH)