-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
0ab1859
commit 84594f1
Showing
18 changed files
with
554 additions
and
144 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/while.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,30 @@ | ||
while 34: # trailing test comment | ||
pass # trailing last statement comment | ||
|
||
# trailing while body comment | ||
|
||
# leading else comment | ||
|
||
else: # trailing else comment | ||
pass | ||
|
||
# trailing else body comment | ||
|
||
|
||
while aVeryLongConditionThatSpillsOverToTheNextLineBecauseItIsExtremelyLongAndGoesOnAndOnAndOnAndOnAndOnAndOnAndOnAndOnAndOn: # trailing comment | ||
pass | ||
|
||
else: | ||
... | ||
|
||
while ( | ||
some_condition(unformatted, args) and anotherCondition or aThirdCondition | ||
): # comment | ||
print("Do something") | ||
|
||
|
||
while ( | ||
some_condition(unformatted, args) # trailing some condition | ||
and anotherCondition or aThirdCondition # trailing third condition | ||
): # comment | ||
print("Do something") |
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.