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
From what I can tell, it's not valid to have line breaks within a singly quoted f-string (i.e: f"foo {bar}") even if the line breaks appear within a substitution block. Triply quoted (i.e: traditional multi-line strings) do seem to support line breaks in substitution blocks:
f""" foo{bar(3, )}"""
Following form this it might be nice if tuck supported wrapping in these cases. Maybe.
This would need to be a Python 3.12+ only feature though, since only 3.12+ offers useful tokens within f-strings. At that point we'll also need to rework some of our token parsing code given that we currently rely on token.string as a shorthand, however that's not always reliable (see e.g: PeterJCLaw/flake8-commas@8ee37e0).
The text was updated successfully, but these errors were encountered:
From what I can tell, it's not valid to have line breaks within a singly quoted f-string (i.e:
f"foo {bar}"
) even if the line breaks appear within a substitution block. Triply quoted (i.e: traditional multi-line strings) do seem to support line breaks in substitution blocks:Following form this it might be nice if tuck supported wrapping in these cases. Maybe.
This would need to be a Python 3.12+ only feature though, since only 3.12+ offers useful tokens within f-strings. At that point we'll also need to rework some of our token parsing code given that we currently rely on
token.string
as a shorthand, however that's not always reliable (see e.g: PeterJCLaw/flake8-commas@8ee37e0).The text was updated successfully, but these errors were encountered: