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
Trailing list/tuple literals in arguments #1010
Comments
I think it makes sense to collapse a list/tuple/… literal like this (sans trailing comma). I think the precedence depending on line length should be (most preferred to least preferred):
and for a call with a trailing collection literal:
|
Somewhat tangentially, is triggering E231 here considered a bug in Black, or is it intended behavior? I'm not sure if I should configure my |
I too am hitting this, while I can setup flake8 to ignore, I'm curious which formatter is correct here.
|
As far as I can tell that's a bug in black, and you should remove it manually there (black will not re-add it then). |
Is there a separate ticket for this? It sure is very annoying. |
Yes, #1202 |
One case where I consider black’s output clearly uglier than my hand-formatted output is code that looks like tree DSLs, e.g.:
or similar code:
Both of which black would blow up into the space-consuming and in no way more clear versions with one short parameter on its own line and then the list/tuple literal after, with one more indentation level than in my version.
The text was updated successfully, but these errors were encountered: