Fix range of unparenthesized tuple subject in match statement (#8101)

## Summary

This was just a bug in the parser ranges, probably since it was
initially implemented. Given `match n % 3, n % 5: ...`, the "subject"
(i.e., the tuple of two binary operators) was using the entire range of
the `match` statement.

Closes https://github.com/astral-sh/ruff/issues/8091.

## Test Plan

`cargo test`
This commit is contained in:
Charlie Marsh 2023-10-22 16:58:33 -07:00 committed by GitHub
parent 95702e408f
commit d6a4283003
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 2763 additions and 2369 deletions

View file

@ -1136,6 +1136,15 @@ match x:
match x:
case (0,):
y = 0
match x,:
case z:
pass
match x, y:
case z:
pass
match x, y,:
case z:
pass
"#,
"<test>",
)