-
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
e3b0614
commit 47988c9
Showing
19 changed files
with
975 additions
and
743 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_skip/parentheses.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,20 @@ | ||
if ( | ||
# a leading condition comment | ||
len([1, 23, 3, 4, 5]) > 2 # trailing condition comment | ||
# trailing own line comment | ||
): # fmt: skip | ||
pass | ||
|
||
|
||
if ( # trailing open parentheses comment | ||
# a leading condition comment | ||
len([1, 23, 3, 4, 5]) > 2 | ||
) and ((((y)))): # fmt: skip | ||
pass | ||
|
||
|
||
if ( # trailing open parentheses comment | ||
# a leading condition comment | ||
len([1, 23, 3, 4, 5]) > 2 | ||
) and y: # fmt: skip | ||
pass |
28 changes: 28 additions & 0 deletions
28
crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_skip/type_params.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,28 @@ | ||
class TestTypeParam[ T ]: # fmt: skip | ||
pass | ||
|
||
class TestTypeParam [ # trailing open paren comment | ||
# leading comment | ||
T # trailing type param comment | ||
# trailing type param own line comment | ||
]: # fmt: skip | ||
pass | ||
|
||
class TestTrailingComment4[ | ||
T | ||
] ( # trailing arguments open parenthesis comment | ||
# leading argument comment | ||
A # trailing argument comment | ||
# trailing argument own line comment | ||
): # fmt: skip | ||
pass | ||
|
||
def test [ | ||
# comment | ||
A, | ||
|
||
# another | ||
|
||
B, | ||
] (): # fmt: skip | ||
... |
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.