sourcery
sourcery copied to clipboard
replace-with-f-string fooled by """multiline strings"""
Checklist
- [?] This is a new feature, not a refactoring suggestion
- [x] I have checked for this feature in the Sourcery documentation
- [x] I have checked there are no open requests referencing the same feature
Description
I love replace-with-f-string for cleaning old code.
But today I was sad that it couldn't automatically fix some horrible multi-line sql concatenations.
Simple example:
It sees this:
temp = "yes we can: " + filename
It cannot see this:
temp = """oh no
a multiline string!""" + filename