-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Line too long: Long triple-quoted string #1617
Comments
FWIW I don't think that In the original example in OP, the string in I think this is working as intended. We can have a discussion if this is the right intention or not :) |
Does it work with |
@JelleZijlstra same results. |
Yeah, this is not a bug. There's no point putting additional parentheses around things that won't fit anyway. If you split the string into two, you'll see correct behavior. It's a bug that |
@JelleZijlstra @ambv I know I'm late to the party here, but note that |
=
in a string literal on a line that is too long undoes the attempted column shortening
Describe the bug Adding an
=
within an f-string that is too long to fit on a line causes Black to undo the work it did to try and make the line fit within the column restrictionsTo Reproduce Steps to reproduce the behavior:
Wraps
class gets wrapped to try and make the line shorter, while in theNoWrap
class the introduction of a=
in the f-string undoes the wrapping.Expected behavior
To see the line with the
=
in the f-string` still be wrapped since it is now even longer than before.Environment (please complete the following information):
Does this bug also happen on master?
Yes.
The text was updated successfully, but these errors were encountered: