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

70 lines
1.0 KiB
Plaintext

---
source: crates/ruff_python_formatter/tests/fixtures.rs
input_file: crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/fmtskip5.py
---
## Input
```py
a, b, c = 3, 4, 5
if (
a == 3
and b != 9 # fmt: skip
and c is not None
):
print("I'm good!")
else:
print("I'm bad")
```
## Black Differences
```diff
--- Black
+++ Ruff
@@ -1,9 +1,10 @@
a, b, c = 3, 4, 5
if (
a == 3
- and b != 9 # fmt: skip
+ and b
+ != 9 # fmt: skip
and c is not None
):
- print("I'm good!")
+ NOT_IMPLEMENTED_call(NOT_IMPLEMENTED_arg)
else:
- print("I'm bad")
+ NOT_IMPLEMENTED_call(NOT_IMPLEMENTED_arg)
```
## Ruff Output
```py
a, b, c = 3, 4, 5
if (
a == 3
and b
!= 9 # fmt: skip
and c is not None
):
NOT_IMPLEMENTED_call(NOT_IMPLEMENTED_arg)
else:
NOT_IMPLEMENTED_call(NOT_IMPLEMENTED_arg)
```
## Black Output
```py
a, b, c = 3, 4, 5
if (
a == 3
and b != 9 # fmt: skip
and c is not None
):
print("I'm good!")
else:
print("I'm bad")
```