Zac-HD / shed

`shed` canonicalises Python code. Shed your legacy, stop bikeshedding, and move on. Black++
https://pypi.org/project/shed/
GNU Affero General Public License v3.0
342 stars 23 forks source link

flynt for f strings #21

Closed mcarans closed 3 years ago

mcarans commented 3 years ago

Thanks for a very helpful project!

I have found that pyupgrade does not work as well with converting old strings to f strings as another project called flynt that is dedicated to that task only.

I'd like to suggest running flynt as part of the process in addition to pyupgrade which does a lot of other stuff as well.

Zac-HD commented 3 years ago

Thanks for getting in touch, and for your suggestion!

Having looked into flynt, I'm not going to add it - the transformations aren't always safe, and I actually prefer pyupgrade's caution about using complex expressions in f-strings. I will however list it in the README as a related tool 😁