mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-31 07:37:38 +00:00
Add new with
and match
sequence test cases (#9128)
## Summary Add new test cases for `with_item` and `match` sequence that demonstrate how long headers break. Removes one use of `optional_parentheses` in a position where it is know that the parentheses always need to be added. ## Test Plan cargo test
This commit is contained in:
parent
25b2361411
commit
c8d6958d15
5 changed files with 34 additions and 5 deletions
|
@ -578,3 +578,8 @@ match n % 3, n % 5:
|
|||
print("Buzz")
|
||||
case _:
|
||||
print(n)
|
||||
|
||||
# Unparenthesized tuples
|
||||
match x:
|
||||
case Child(aaaaaaaaa, bbbbbbbbbbbbbbb, cccccc), Doc(aaaaa, bbbbbbbbbb, ddddddddddddd):
|
||||
pass
|
||||
|
|
|
@ -303,3 +303,7 @@ if True:
|
|||
if True:
|
||||
with anyio.CancelScope(shield=True) if get_running_loop() else contextlib.nullcontext():
|
||||
pass
|
||||
|
||||
|
||||
with Child(aaaaaaaaa, bbbbbbbbbbbbbbb, cccccc), Document(aaaaa, bbbbbbbbbb, ddddddddddddd):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue