Skip to content
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

Remove unnecessary brackets around function parameters #2900

Closed
saroad2 opened this issue Feb 28, 2022 · 1 comment
Closed

Remove unnecessary brackets around function parameters #2900

saroad2 opened this issue Feb 28, 2022 · 1 comment
Labels
F: parentheses Too many parentheses, not enough parentheses, and so on. T: style What do we want Blackened code to look like?

Comments

@saroad2
Copy link
Contributor

saroad2 commented Feb 28, 2022

Describe the style change

The following code:

def foo(a)
    print(a)

foo(a=([1, 2, 3]))

Should be changed into:

def foo(a)
    print(a)

foo(a=[1, 2, 3])

Examples in the current Black style

As for now, the example above doesn't change by Black.

Desired style

When circular brackets are not used to break up command parameters into different lines, it should be removed entirely

Additional context

I use python 3.9 on Windows computer.

@saroad2 saroad2 added the T: style What do we want Blackened code to look like? label Feb 28, 2022
@JelleZijlstra JelleZijlstra added the F: parentheses Too many parentheses, not enough parentheses, and so on. label Feb 28, 2022
@JelleZijlstra
Copy link
Collaborator

Similar to #1123, #2338, #2522, #608. This is a good idea, but I'm going to say it's a dupe of #608.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: parentheses Too many parentheses, not enough parentheses, and so on. T: style What do we want Blackened code to look like?
Projects
None yet
Development

No branches or pull requests

2 participants