fstringify icon indicating copy to clipboard operation
fstringify copied to clipboard

CLI tool to convert a python project's %-formatted strings to f-strings.

Results 6 fstringify issues
Sort by recently updated
recently updated
newest added

`example.py`: ```py a = "I'm raw %r" % 'string' ``` After running `fstringify` on such file it won't be changed. Possibly there are another incompatibility with formatting, but did not...

(note this is a minimal case, the rule that `pyupgrade` uses is to avoid 1-ary formats with a single variable on the right hand side since it is not possible...

I have converted many % operators using fstringify, yet over 600 other instances remain unconverted. I wonder whether this issue may be related to #13. For example, [leoBridgeTest.py](https://github.com/leo-editor/leo-editor/blob/devel/leo/core/leoBridgeTest.py) contains: ```python...

It's natural to use r"regex-pattern". When converting % operators within such strings, it would be much more helpful to leave the regex-pattern exactly as it was, *except* for any %...

enhancement
help wanted

IMHO this tool should be able to convert the strings like `'Hello {}'.format(world)` to fstrings too.

Hi, first of all it's really cool and I was thinking in do this tool but I found yours, I'll contribute here. The issue is when there is a \n...