Replies: 1 comment
-
whitespace is not encoded in ast so it is impossible to remove the empty line. The ideal workflow is to apply a formatter after rewriting. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With an input file like
Running
ast-grep --pattern 'a=1' --rewrite '' --lang python -U
will remove the assignment but leave the empty line.
Is there a way to remove the empty line as well?
Beta Was this translation helpful? Give feedback.
All reactions