ruff/crates/ruff_python_formatter/tests/snapshots/black_compatibility@fmtonof...

111 lines
1010 B
Plaintext

---
source: crates/ruff_python_formatter/tests/fixtures.rs
input_file: crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/fmtonoff4.py
---
## Input
```py
# fmt: off
@test([
1, 2,
3, 4,
])
# fmt: on
def f(): pass
@test([
1, 2,
3, 4,
])
def f(): pass
```
## Black Differences
```diff
--- Black
+++ Ruff
@@ -1,8 +1,12 @@
# fmt: off
-@test([
- 1, 2,
- 3, 4,
-])
+@test(
+ [
+ 1,
+ 2,
+ 3,
+ 4,
+ ],
+)
# fmt: on
def f():
pass
@@ -14,7 +18,7 @@
2,
3,
4,
- ]
+ ],
)
def f():
pass
```
## Ruff Output
```py
# fmt: off
@test(
[
1,
2,
3,
4,
],
)
# fmt: on
def f():
pass
@test(
[
1,
2,
3,
4,
],
)
def f():
pass
```
## Black Output
```py
# fmt: off
@test([
1, 2,
3, 4,
])
# fmt: on
def f():
pass
@test(
[
1,
2,
3,
4,
]
)
def f():
pass
```