Method: pylint.checkers.base.basic_error_checker.BasicErrorChecker.visit_unaryop
Calls: 220, Exceptions: 0, Paths: 4Back
Path 1: 126 calls (0.57)
UnaryOp (126)
1@utils.only_required_for_messages("nonexistent-operator")
2 def visit_unaryop(self, node: nodes.UnaryOp) -> None:
3 """Check use of the non-existent ++ and -- operators."""
4 if (
5 (node.op in "+-")
6 and isinstance(node.operand, nodes.UnaryOp)
7 and (node.operand.op == node.op)
8 and (node.col_offset + 1 == node.operand.col_offset)
9 ):
10 self.add_message("nonexistent-operator", node=node, args=node.op * 2)
Path 2: 84 calls (0.38)
UnaryOp (84)
1@utils.only_required_for_messages("nonexistent-operator")
2 def visit_unaryop(self, node: nodes.UnaryOp) -> None:
3 """Check use of the non-existent ++ and -- operators."""
4 if (
5 (node.op in "+-")
6 and isinstance(node.operand, nodes.UnaryOp)
7 and (node.operand.op == node.op)
8 and (node.col_offset + 1 == node.operand.col_offset)
9 ):
10 self.add_message("nonexistent-operator", node=node, args=node.op * 2)
Path 3: 6 calls (0.03)
UnaryOp (6)
1@utils.only_required_for_messages("nonexistent-operator")
2 def visit_unaryop(self, node: nodes.UnaryOp) -> None:
3 """Check use of the non-existent ++ and -- operators."""
4 if (
5 (node.op in "+-")
6 and isinstance(node.operand, nodes.UnaryOp)
7 and (node.operand.op == node.op)
8 and (node.col_offset + 1 == node.operand.col_offset)
9 ):
10 self.add_message("nonexistent-operator", node=node, args=node.op * 2)
Path 4: 4 calls (0.02)
UnaryOp (4)
1@utils.only_required_for_messages("nonexistent-operator")
2 def visit_unaryop(self, node: nodes.UnaryOp) -> None:
3 """Check use of the non-existent ++ and -- operators."""
4 if (
5 (node.op in "+-")
6 and isinstance(node.operand, nodes.UnaryOp)
7 and (node.operand.op == node.op)
8 and (node.col_offset + 1 == node.operand.col_offset)
9 ):
10 self.add_message("nonexistent-operator", node=node, args=node.op * 2)