-
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
newline inside bracket? #1048
Comments
You can try putting the entire bracketed expression inside parenthesis like so:
But maybe the best thing for this piece of code would be to extract some sub-expressions to locals. Even with the above formatting it's hard to tell what's going on. |
i mean that's for me to decide isn't it? my point is why would black format in this way. |
Yes, it's absolutely up to you. Black formats it this way currently because of the algorithm that's explained in the readme (right hand splitting - it starts from the right side of the expression and breaks it up). My point with that sentence was that I don't believe there is a good way of formatting that expression as it is. |
any way to avoid this?
The text was updated successfully, but these errors were encountered: