flynt
flynt copied to clipboard
ANSI escape codes removed/unescaped
Before
"""Prints things in bold."""
s = "wot?"
print("\033[1m{0}\033[0m".format(s))
After:
"""Prints things in bold."""
s = "wot?"
print(f"{s}")
Looks like it actually writes the escape codes back as escaped text in the files. This is what it now looks like in vim:
When I run the script then the output is the same, but for editing purposes, keeping the original would be ideal.
Hi, thanks for the bug report!
This is likely to share root cause with #55 - might take some time before this is solved.
This seems to be a bug in astor
, actually.
I think I may have a fix...