Skip to content

Commit acc1d07

Browse files
committed
Remove unnecessary super calls
I previously misunderstood the on_visit method. We don't need to call super.on_visit, simply returning True/False is enough.
1 parent 4f97de7 commit acc1d07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mutmut/file_mutation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __init__(self, provider: "OuterFunctionProvider", top_level_node: cst.CSTNod
8484

8585
def on_visit(self, node: cst.CSTNode):
8686
self.provider.set_metadata(node, self.top_level_node)
87-
return super().on_visit(node)
87+
return True
8888

8989

9090
class MutationVisitor(cst.CSTVisitor):
@@ -108,7 +108,7 @@ def on_visit(self, node):
108108
self._create_mutations(node)
109109

110110
# continue to mutate children
111-
return super().on_visit(node)
111+
return True
112112

113113
def _create_mutations(self, node: cst.CSTNode):
114114
for t, operator in self._operators:

0 commit comments

Comments
 (0)