ruff/crates/ruff_python_parser/src
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
..
lexer Mention that Cursor is based on rustc's implementation. (#12109) 2024-06-30 16:53:25 +01:00
parser [syntax-errors] Irrefutable case pattern before final case (#16905) 2025-03-26 12:27:16 -04:00
snapshots Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
error.rs [syntax-errors] PEP 701 f-strings before Python 3.12 (#16543) 2025-03-18 11:12:15 -04:00
lexer.rs bump MSRV to 1.83 (#16294) 2025-02-26 06:12:43 -08:00
lib.rs [syntax-errors] Start detecting compile-time syntax errors (#16106) 2025-03-21 14:45:25 -04:00
semantic_errors.rs [syntax-errors] Irrefutable case pattern before final case (#16905) 2025-03-26 12:27:16 -04:00
string.rs Upgrade to Rust 1.81 (#13265) 2024-09-06 15:09:09 +02:00
token.rs [syntax-errors] PEP 701 f-strings before Python 3.12 (#16543) 2025-03-18 11:12:15 -04:00
token_set.rs Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
token_source.rs [syntax-errors] PEP 701 f-strings before Python 3.12 (#16543) 2025-03-18 11:12:15 -04:00
typing.rs Rename ExprStringLiteral::as_unconcatenated_string() to ExprStringLiteral::as_single_part_string() (#16253) 2025-02-19 16:06:57 +00:00