-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hug parens also with multiline unpacking #3992
Hug parens also with multiline unpacking #3992
Conversation
I only gave list/args as an example. But there's dict/kwargs unpacking too: def foo(**kwargs):
print(kwargs)
other = {"d": 4}
foo(**{
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": 1,
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb": 2,
"ccccccccccccccccccccccccccccccccc": 3,
**other,
}) |
diff-shades results comparing this PR (79b8eca) to main (5edd993). The full diff is available in the logs under the "Generate HTML diff report" step.
|
Hmm, the linting is failing. Should we format Black with the edit: To answer my own question, the CI runs with |
Description
As noted by @Avasam here, hugging parens with brackets on multiline dictionaries and lists as sole function parameters didn't take into account list/dict unpacking. This PR fixes that shortcoming.
Checklist - did you ...
CHANGES.md
if necessary?