ruff/crates/ruff_python_parser/tests
Brent Westbrook c8a06a9be8
[syntax-errors] Limit except* range to * (#16473)
Summary
--
This is a follow-up to #16446 to fix the diagnostic range to point to
the `*` like `pyright` does
(https://github.com/astral-sh/ruff/pull/16446#discussion_r1976900643).

Storing the range in the `ExceptClauseKind::Star` variant feels slightly
awkward, but we don't store the star itself anywhere on the
`ExceptHandler`. And we can't just take `ExceptHandler.start() +
"except".text_len()` because this code appears to be valid:

```python
try: ...
except    *    Error: ...
```

Test Plan
--
Existing tests.
2025-03-04 16:50:09 +00:00
..
snapshots [syntax-errors] Limit except* range to * (#16473) 2025-03-04 16:50:09 +00:00
fixtures.rs Document LinterResult::has_syntax_error and add Parsed::has_no_syntax_errors (#16443) 2025-03-04 08:35:38 -05:00
generate_inline_tests.rs Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30