ruff/crates/ruff_python_parser/src/parser
Brent Westbrook 32c66ec4b7
[syntax-errors] type alias statements before Python 3.12 (#16478)
Summary
--
Another simple one, just detect standalone `type` statements. I limited
the diagnostic to `type` itself like [pyright]. That probably makes the
most sense for more complicated examples.

Test Plan
--
Inline tests.

[pyright]:
https://pyright-play.net/?pythonVersion=3.8&strict=true&code=C4TwDgpgBAHlC8UCWA7YQ
2025-03-04 17:20:10 +00:00
..
snapshots Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
expression.rs [syntax-errors] except* before Python 3.11 (#16446) 2025-03-02 18:20:18 +00:00
helpers.rs Refactor binary expression parsing (#11073) 2024-04-23 04:42:40 +00:00
mod.rs [syntax-errors] except* before Python 3.11 (#16446) 2025-03-02 18:20:18 +00:00
options.rs Start detecting version-related syntax errors in the parser (#16090) 2025-02-25 23:03:48 -05:00
pattern.rs Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
progress.rs Replace LALRPOP parser with hand-written parser (#10036) 2024-04-18 17:57:39 +05:30
recovery.rs Use CompactString for Identifier (#12101) 2024-07-01 10:06:02 +02:00
statement.rs [syntax-errors] type alias statements before Python 3.12 (#16478) 2025-03-04 17:20:10 +00:00
tests.rs Pass ParserOptions to the parser (#16220) 2025-02-19 10:50:50 -05:00