I am writing a codemod with libcst which inherits from VisitorBasedCodemodCommand
. It works fine but is rather slow. One simple trick would be to skip all test files which start with test_
by convention. However I haven't been able to find a place to add such logic in my codemod.
I saw a SkipFile
exception but I don't know from where I could trigger it.
How can I ignore my test files?