Hello
Here’s an example of what can be achieved:
comby 'failUnlessEqual(:[a],:[b])' 'assertEqual(:[a],:[b])' example.py
--- example.py
+++ example.py
@@ -1,6 +1,6 @@
def test(self):
r = self.parse("if 1 fooze", 'r3')
- self.failUnlessEqual(
+ self.assertEqual(
r.tree.toStringTree(),
'(if 1 fooze)'
)
More examples are available in the documentation.
Comby is a tool that in the same vein than Semgrep that is a nice companion to Kakoune regexp primitives.