Should Black remove optional parentheses that wrap assignment expressions? #1656
Labels
F: parentheses
Too many parentheses, not enough parentheses, and so on.
T: style
What do we want Blackened code to look like?
Describe the style change
Black would now remove optional parentheses that surround assignment expressions. Also Black will now have to take into account of situations where such removal would be unsafe (e.g. top level unparenthesized assignment expressions are illegal).
Examples in the current style
Examples in the new style:
Things to discuss:
What are the conditions where Black would remove/keep the wrapping parentheses? Perhaps we can use this specification as a starting point?
Do we want this in the first place?
Additional context:
This was originally filed in #1522 by @xrisk. I closed it as a duplicate of another issue and broke out the other topic in it as this new issue.
Related comments in original issue:
The text was updated successfully, but these errors were encountered: