Skip to content

unnecessary parentheses in unpacking aren't removed #3080

@Akuli

Description

@Akuli

Describe the style change

Replace (foo) with foo when unpacking, where foo is an expression.

Examples in the current Black style

points = [(1, 2), (3, 4)]
for (x), (y) in points:
    print(x, y)

Desired style

points = [(1, 2), (3, 4)]
for x, y in points:
    print(x, y)

Metadata

Metadata

Assignees

Labels

F: parenthesesToo many parentheses, not enough parentheses, and so on.S: acceptedThe changes in this design / enhancement issue have been accepted and can be implementedT: styleWhat do we want Blackened code to look like?

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions