black/tests/data/preview_py_310/pep_572.py
Charlie Marsh a20338cf10
Avoid removing whitespace for walrus operators within subscripts (#3823)
Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-09-08 07:37:13 -07:00

13 lines
141 B
Python

x[a:=0]
x[a := 0]
x[a := 0, b := 1]
x[5, b := 0]
x[a:=0,b:=1]
# output
x[a := 0]
x[a := 0]
x[a := 0, b := 1]
x[5, b := 0]
x[a := 0, b := 1]