-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nesting of string literals with the same quote type inside f-string #10184
Comments
Is this after you ran |
Yes, it must be |
Yeah, that's expected because you configured What are your reasons for preferring alternating quotes? What's your preferred formatting if the f-string has one more level of nesting? CC: @dhruvmanila |
I prefer double quotes and I try to avoid nesting f-strings. You are right that with Python 3.12 the f-string behavior has changed. I was just a bit confused at the beginning because PyCharm marked it. |
That's true. I'm leaning towards leaving it as is and allow users to configure whether they want backwards compatibility or not by setting the target-version. |
before
after
issue
(tooltip from PyCharm)
solution
or don't change the single quotes at all.
ruff 0.2.2 with preview enabled
The text was updated successfully, but these errors were encountered: