ruff/crates/ruff_python_ast
Brent Westbrook 5697d21fca
[syntax-errors] Irrefutable case pattern before final case (#16905)
Summary
--

Detects irrefutable `match` cases before the final case using a modified
version
of the existing `Pattern::is_irrefutable` method from the AST crate. The
modified method helps to retrieve a more precise diagnostic range to
match what
Python 3.13 shows in the REPL.

Test Plan
--

New inline tests, as well as some updates to existing tests that had
irrefutable
patterns before the last block.
2025-03-26 12:27:16 -04:00
..
src [syntax-errors] Irrefutable case pattern before final case (#16905) 2025-03-26 12:27:16 -04:00
ast.toml [syntax-errors] Duplicate type parameter names (#16858) 2025-03-21 15:06:22 -04:00
Cargo.toml Transition to salsa coarse-grained tracked structs (#15763) 2025-02-11 11:38:50 +01:00
generate.py [red-knot] Auto generate statement nodes (#16645) 2025-03-13 15:43:48 +01:00