mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 13:33:50 +00:00
![]() 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. |
||
---|---|---|
.. | ||
lexer | ||
parser | ||
snapshots | ||
error.rs | ||
lexer.rs | ||
lib.rs | ||
string.rs | ||
token.rs | ||
token_set.rs | ||
token_source.rs | ||
typing.rs |