-
-
Notifications
You must be signed in to change notification settings - Fork 831
Labels
Contributions WelcomeWe welcome contributions to fix this issue!We welcome contributions to fix this issue!EnhancementNew feature or requestNew feature or requestLow RiskRisk of bugs in transformers and other librariesRisk of bugs in transformers and other librariesMedium Priority(will be worked on after all high priority issues)(will be worked on after all high priority issues)
Description
We're planning to take a library-wide sweep through these separately. For now, I'm following the existing patterns, but it is on the backlog.
– original
I've used ast-grep spells like this in the past (YMMV, just found these in my shell history):
ast-grep run --pattern 'assert $A' --rewrite 'if not ($A): raise AssertionError("$A")' -l python -i src
ast-grep run --pattern 'assert $$$A, $B' --rewrite 'if not ($A): raise AssertionError($B)' -l python -i src
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Contributions WelcomeWe welcome contributions to fix this issue!We welcome contributions to fix this issue!EnhancementNew feature or requestNew feature or requestLow RiskRisk of bugs in transformers and other librariesRisk of bugs in transformers and other librariesMedium Priority(will be worked on after all high priority issues)(will be worked on after all high priority issues)