Skip to content

Commit

Permalink
Use black fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
cnpryer committed Jun 18, 2023
1 parent 239daa7 commit e03aa97
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 0 deletions.
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
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
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
```


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
```


0 comments on commit e03aa97

Please sign in to comment.