mirror of
https://github.com/astral-sh/ruff
synced 2026-01-07 14:44:17 -05: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user