mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 11:59:10 +00:00
format ExprListComp (#5600)
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
987111f5fb
commit
1782fb8c30
13 changed files with 489 additions and 128 deletions
32
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/list_comp.py
vendored
Normal file
32
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/list_comp.py
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
[i for i in []]
|
||||
|
||||
[i for i in [1,]]
|
||||
|
||||
[
|
||||
a # a
|
||||
for # for
|
||||
c # c
|
||||
in # in
|
||||
e # e
|
||||
]
|
||||
|
||||
[
|
||||
# above a
|
||||
a # a
|
||||
# above for
|
||||
for # for
|
||||
# above c
|
||||
c # c
|
||||
# above in
|
||||
in # in
|
||||
# above e
|
||||
e # e
|
||||
# above if
|
||||
if # if
|
||||
# above f
|
||||
f # f
|
||||
# above if2
|
||||
if # if2
|
||||
# above g
|
||||
g # g
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue