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:
@@ -222,8 +222,7 @@ match ( # d 2
|
||||
case d2:
|
||||
pass
|
||||
match d3:
|
||||
case (
|
||||
# d 3
|
||||
case ( # d 3
|
||||
x
|
||||
):
|
||||
pass
|
||||
|
||||
@@ -354,8 +354,7 @@ match pattern_comments:
|
||||
|
||||
|
||||
match pattern_comments:
|
||||
case (
|
||||
# leading
|
||||
case ( # leading
|
||||
only_leading
|
||||
):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user