Handle open-parenthesis comments on match case (#6798)

## Summary

Ensures that we retain the open-parenthesis comment in cases like:
```python
match pattern_comments:
    case (  # leading
        only_leading
    ):
        ...
```

Previously, this was treated as a leading comment on `only_leading`.

## Test Plan

`cargo test`
This commit is contained in:
Charlie Marsh 2023-08-23 00:40:18 -04:00 committed by GitHub
parent 5f5de52aba
commit 4bc5eddf91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 20 deletions

View file

@ -222,8 +222,7 @@ match ( # d 2
case d2:
pass
match d3:
case (
# d 3
case ( # d 3
x
):
pass

View file

@ -354,8 +354,7 @@ match pattern_comments:
match pattern_comments:
case (
# leading
case ( # leading
only_leading
):
pass