-
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
Showing
4 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/assert.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,6 @@ | ||
assert ( | ||
# Some comment | ||
True # Some comment | ||
# Some comment | ||
), "Some string" # Some comment | ||
# Some comment |
6 changes: 6 additions & 0 deletions
6
crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/assert.py.expect
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,6 @@ | ||
assert ( | ||
# Some comment | ||
True # Some comment | ||
# Some comment | ||
), "Some string" # Some comment | ||
# Some comment |
58 changes: 58 additions & 0 deletions
58
...f_python_formatter/src/snapshots/ruff_python_formatter__tests__black_test__assert_py.snap
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,58 @@ | ||
--- | ||
source: crates/ruff_python_formatter/src/lib.rs | ||
expression: snapshot | ||
input_file: crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/assert.py | ||
--- | ||
## Input | ||
|
||
```py | ||
assert ( | ||
# Some comment | ||
True # Some comment | ||
# Some comment | ||
), "Some string" # Some comment | ||
# Some comment | ||
``` | ||
|
||
## Black Differences | ||
|
||
```diff | ||
--- Black | ||
+++ Ruff | ||
@@ -1,6 +1,8 @@ | ||
assert ( | ||
# Some comment | ||
True # Some comment | ||
+), ( | ||
# Some comment | ||
-), "Some string" # Some comment | ||
+ "NOT_YET_IMPLEMENTED_STRING" | ||
+) # Some comment | ||
# Some comment | ||
``` | ||
|
||
## Ruff Output | ||
|
||
```py | ||
assert ( | ||
# Some comment | ||
True # Some comment | ||
), ( | ||
# Some comment | ||
"NOT_YET_IMPLEMENTED_STRING" | ||
) # Some comment | ||
# Some comment | ||
``` | ||
|
||
## Black Output | ||
|
||
```py | ||
assert ( | ||
# Some comment | ||
True # Some comment | ||
# Some comment | ||
), "Some string" # Some comment | ||
# Some comment | ||
``` | ||
|
||
|
27 changes: 27 additions & 0 deletions
27
...ormatter/src/snapshots/ruff_python_formatter__tests__ruff_test__statement__assert_py.snap
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,27 @@ | ||
--- | ||
source: crates/ruff_python_formatter/src/lib.rs | ||
expression: snapshot | ||
--- | ||
## Input | ||
```py | ||
assert ( | ||
# Some comment | ||
True # Some comment | ||
# Some comment | ||
), "Some string" # Some comment | ||
# Some comment | ||
``` | ||
|
||
|
||
|
||
## Output | ||
```py | ||
assert ( | ||
# Some comment | ||
True # Some comment | ||
# Some comment | ||
), "Some string" # Some comment | ||
# Some comment | ||
``` | ||
|
||
|