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:
Micha Reiser 2023-12-15 11:45:13 +09:00 committed by GitHub
parent 25b2361411
commit c8d6958d15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 5 deletions

View file

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

View file

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