ruff/crates/ruff_python_parser/src
Charlie Marsh d6a4283003
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`
2023-10-22 19:58:33 -04:00
..
lexer Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
snapshots Fix range of unparenthesized tuple subject in match statement (#8101) 2023-10-22 19:58:33 -04:00
context.rs Remove `Parse` trait (#6235) 2023-08-01 18:35:03 +02:00
function.rs Move `Ranged` into `ruff_text_size` (#6919) 2023-08-27 14:12:51 -04:00
lexer.rs Fix lexing single-quoted f-string with multi-line format spec (#7787) 2023-10-05 23:12:09 +05:30
lib.rs Skip all bracketed expressions when locating comparison ops (#7740) 2023-10-01 14:57:40 +00:00
parser.rs Fix range of unparenthesized tuple subject in match statement (#8101) 2023-10-22 19:58:33 -04:00
python.lalrpop Fix range of unparenthesized tuple subject in match statement (#8101) 2023-10-22 19:58:33 -04:00
python.rs Fix range of unparenthesized tuple subject in match statement (#8101) 2023-10-22 19:58:33 -04:00
soft_keywords.rs Replace `.map_or(false, $closure)` with `.is_some_and(closure)` (#6244) 2023-08-01 19:29:42 +02:00
string.rs Remove escaped mac/windows eol from AST string value (#7724) 2023-10-01 07:37:59 +05:30
token.rs Add support for PEP 701 (#7376) 2023-09-29 02:55:39 +00:00
typing.rs Replace `.map_or(false, $closure)` with `.is_some_and(closure)` (#6244) 2023-08-01 19:29:42 +02:00