mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-13 05:47:06 +00:00
Format assert
statement (#5168)
This commit is contained in:
parent
5a4516b812
commit
a961f75e13
14 changed files with 442 additions and 370 deletions
30
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/assert.py
vendored
Normal file
30
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/assert.py
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
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
|
||||
)
|
||||
|
||||
# TODO: https://github.com/astral-sh/ruff/pull/5168#issuecomment-1630767421
|
||||
# Leading assert
|
||||
assert (
|
||||
# Leading test value
|
||||
True # Trailing test value same-line
|
||||
# Trailing test value own-line
|
||||
), "Some string" # Trailing msg same-line
|
||||
# Trailing assert
|
||||
|
||||
# Random dangler
|
||||
|
||||
# TODO: https://github.com/astral-sh/ruff/pull/5168#issuecomment-1630767421
|
||||
# Leading assert
|
||||
assert (
|
||||
# Leading test value
|
||||
True # Trailing test value same-line
|
||||
# Trailing test value own-line
|
||||
|
||||
# Test dangler
|
||||
), "Some string" # Trailing msg same-line
|
||||
# Trailing assert
|
Loading…
Add table
Add a link
Reference in a new issue