Closed JLLeitschuh closed 5 months ago
@JLLeitschuh what about the 3+ argument use cases or where there is already a tuple on one side?
Bah... You're absolutely right. This sounds annoying to deal with 😆 but you're right
@shanman190 covered those additional cases too now 😄
🎉 first cleanup recipe for python!
Python recipe that merges chains of calls of
x.startswith("a") or x.startswtih("ab")
to a single call ofx.startswith(("a", "ab"))
.Signed-off-by: Jonathan Leitschuh Jonathan.Leitschuh@gmail.com
What's changed?
Adds the first Python cleanup recipe!
What's your motivation?
I wanted to try out writing a python recipe to actually fix a simple issue.
Going to be completely honest, found this quite painful to do.
Without a
PythonTemplate
similar toJavaTemplate
as well no workingAutoFormat
for python, you have to consider all of the formatting manually.Anything in particular you'd like reviewers to focus on?
Any edge cases that you think I likely missed?
Any additional context
Checklist