Replies: 1 comment
-
I found class WhitespaceRemover2(m.MatcherDecoratableTransformer):
@m.leave(
m.Add()
| m.Subtract()
| m.Multiply()
| m.Divide()
| m.Modulo()
| m.MatrixMultiply()
| m.Power()
)
def rm_space_around_operators(self, orig_node, updated_node):
return updated_node.with_changes(
whitespace_before=s0,
whitespace_after=s0,
) Perhaps this can be improved further. |
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
-
I would like to control the whitespace around all binary operators. So far, I got
which works well. It seems a little repetetive though, and perhaps I forgot an operation. Is there a way to shorten this?
Beta Was this translation helpful? Give feedback.
All reactions