You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
params= {}
string="this is my string with "f'"{params.get("mine")}"'
ruff format in 0.9.1 replaces this to
ruff format test.py --diff
--- test.py
+++ test.py
@@ -1,2 +1,2 @@
params = {}
-string = "this is my string with " f'"{params.get("mine")}"'
\ No newline at end of file
+string = f"this is my string with \"{params.get("mine")}\""
1 file would be reformatted
This is not valid python due to nested f-string using the same quote character (at least, its not valid before py3.12
python -m compileall test.py
Compiling 'test.py'...
*** File "test.py", line 2
string = f"this is my string with \"{params.get("mine")}\""
^
SyntaxError: invalid syntax
It is a very uncommon case and simple enough to just fix up myself, but figured id bug report to make yall aware.
Thanks for the great project!
The text was updated successfully, but these errors were encountered:
Consider the file:
ruff format in 0.9.1 replaces this to
This is not valid python due to nested f-string using the same quote character (at least, its not valid before py3.12
It is a very uncommon case and simple enough to just fix up myself, but figured id bug report to make yall aware.
Thanks for the great project!
The text was updated successfully, but these errors were encountered: