-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
S: acceptedThe changes in this design / enhancement issue have been accepted and can be implementedThe changes in this design / enhancement issue have been accepted and can be implementedT: bugSomething isn't workingSomething isn't working
Description
Describe the bug
Black trims whitespace around :=
operators within slices. I'm not sure if this is a feature or a bug (if it's intended, feel free to close of course).
The behavior is similar to Black's treatment of :
operators in slices as described here, but I can't tell if the same treatment is intentional for :=
operators.
To Reproduce
For example, given this code:
x[y := 1]
The formatted code is:
x[y:=1]
Similar to treatment of the :
operator, Black does not reformat these:
x[(y := 1)]
x[y := f()]
Here's a playground link to demonstrate the above cases.
Metadata
Metadata
Assignees
Labels
S: acceptedThe changes in this design / enhancement issue have been accepted and can be implementedThe changes in this design / enhancement issue have been accepted and can be implementedT: bugSomething isn't workingSomething isn't working