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 not-needed parenthesis #1689

Closed
klahnakoski opened this issue Sep 9, 2020 · 2 comments
Closed

Remove not-needed parenthesis #1689

klahnakoski opened this issue Sep 9, 2020 · 2 comments
Labels
F: parentheses Too many parentheses, not enough parentheses, and so on. R: duplicate This issue or pull request already exists S: accepted The changes in this design / enhancement issue have been accepted and can be implemented T: enhancement New feature or request T: style What do we want Blackened code to look like?

Comments

@klahnakoski
Copy link

Problem
When formatting code with Black, some not-needed parenthesis are kept.

Current behaviour
The following lines remain unchanged after Black formatting

x = (a).b
x = ((a)).b
x = (((a))).b

Expected Behaviour
I would expect parenthesis to be removed

x = a.b

@klahnakoski klahnakoski added the T: enhancement New feature or request label Sep 9, 2020
@JelleZijlstra JelleZijlstra added F: parentheses Too many parentheses, not enough parentheses, and so on. T: style What do we want Blackened code to look like? labels May 30, 2021
@felix-hilden
Copy link
Collaborator

This is related to #1123. I agree that they should be removed with method calls as well.

@felix-hilden felix-hilden added the S: accepted The changes in this design / enhancement issue have been accepted and can be implemented label Jun 16, 2021
@JelleZijlstra
Copy link
Collaborator

This is essentially the same as #2039.

@ichard26 ichard26 added the R: duplicate This issue or pull request already exists label Jan 29, 2022
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. R: duplicate This issue or pull request already exists S: accepted The changes in this design / enhancement issue have been accepted and can be implemented T: enhancement New feature or request T: style What do we want Blackened code to look like?
Projects
None yet
Development

No branches or pull requests

4 participants