-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be107da
commit f1c9eb9
Showing
14 changed files
with
366 additions
and
122 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/for.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
for x in y: # trailing test comment | ||
pass # trailing last statement comment | ||
|
||
# trailing for body comment | ||
|
||
# leading else comment | ||
|
||
else: # trailing else comment | ||
pass | ||
|
||
# trailing else body comment | ||
|
||
|
||
for aVeryLongNameThatSpillsOverToTheNextLineBecauseItIsExtremelyLongAndGoesOnAndOnAndOnAndOnAndOnAndOnAndOnAndOnAndOn in anotherVeryLongNameThatSpillsOverToTheNextLineBecauseItIsExtremelyLongAndGoesOnAndOnAndOnAndOnAndOnAndOnAndOnAndOnAndOn: # trailing comment | ||
pass | ||
|
||
else: | ||
... | ||
|
||
for ( | ||
x, | ||
y, | ||
) in z: # comment | ||
... | ||
|
||
|
||
# remove brackets around x,y but keep them around z,w | ||
for (x, y) in (z, w): | ||
... | ||
|
||
|
||
# type comment | ||
for x in (): # type: int | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.