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
I would assume that the second version of mystr would be formatted, but it doesn't
i=2# This gets formattedsign="+"ifi>0else"-"sign="+"ifi>0else"-"# gets spaces around '>'# This does not get formattedmystr=f"HI {'+'ifi>0else'-'}{i}"mystr=f"HI {'+'ifi>0else'-'}{i}"
The text was updated successfully, but these errors were encountered:
Ruff supports f-string formatting but only as a preview feature. We plan to release it early next year, once we figured out all edge cases :) You can give it a try by setting format.preview = true.
I would assume that the second version of
mystr
would be formatted, but it doesn'tThe text was updated successfully, but these errors were encountered: