Skip to content

Commit

Permalink
Update ruff fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
cnpryer committed Jul 12, 2023
1 parent dc67b81 commit 8a79266
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
assert (
# Asserted
assert True # Trailing same-line
assert True is True # Trailing same-line
assert 1, "Some string" # Trailing same-line
assert aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa # Trailing same-line

assert ( # Dangle1
# Dangle2
)

# Some assert
# Leading assert
assert (
# Let's go inside
True # Go around this
# Below that
), "Some string" # Outside this way
# Passed all that
# Leading test value
True # Trailing test value same-line
# Trailing test value own-line
), "Some string" # Trailing msg same-line
# Trailing assert

# Dangle this here
# Random dangler

# Some assert
# Leading assert
assert (
# Let's go inside
True # Go around this
# Below that
# Leading test value
True # Trailing test value same-line
# Trailing test value own-line

# Dangle that there
), "Some string" # Outside this way
# Passed all that
# Test dangler
), "Some string" # Trailing msg same-line
# Trailing assert
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,71 @@ input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/
---
## Input
```py
assert (
# Asserted
assert True # Trailing same-line
assert True is True # Trailing same-line
assert 1, "Some string" # Trailing same-line
assert aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa # Trailing same-line
assert ( # Dangle1
# Dangle2
)
# Some assert
# Leading assert
assert (
# Let's go inside
True # Go around this
# Below that
), "Some string" # Outside this way
# Passed all that
# Leading test value
True # Trailing test value same-line
# Trailing test value own-line
), "Some string" # Trailing msg same-line
# Trailing assert
# Dangle this here
# Random dangler
# Some assert
# Leading assert
assert (
# Let's go inside
True # Go around this
# Below that
# Leading test value
True # Trailing test value same-line
# Trailing test value own-line
# Dangle that there
), "Some string" # Outside this way
# Passed all that
# Test dangler
), "Some string" # Trailing msg same-line
# Trailing assert
```

## Output
```py
assert True # Trailing same-line
assert True is True # Trailing same-line
assert 1, "Some string" # Trailing same-line
assert (
# Asserted
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
) # Trailing same-line
assert ( # Dangle1
# Dangle2
)
# Some assert
# Leading assert
assert (
# Let's go inside
True # Go around this
# Below that
), "Some string" # Outside this way
# Passed all that
# Leading test value
True # Trailing test value same-line
# Trailing test value own-line
), (
"Some string"
) # Trailing msg same-line
# Trailing assert
# Dangle this here
# Random dangler
# Some assert
# Leading assert
assert (
# Let's go inside
True # Go around this
# Below that
# Dangle that there
), "Some string" # Outside this way
# Passed all that
# Leading test value
True # Trailing test value same-line
# Trailing test value own-line
# Test dangler
), (
"Some string"
) # Trailing msg same-line
# Trailing assert
```


Expand Down

0 comments on commit 8a79266

Please sign in to comment.