ruff/crates/ruff_python_parser/resources
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
..
inline [syntax-errors] Limit except* range to * (#16473) 2025-03-04 16:50:09 +00:00
invalid Consider 2-character EOL before line continuation (#12035) 2024-06-26 14:00:48 +05:30
valid Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
.editorconfig