ruff/crates/ruff_python_parser/src/parser
Brent Westbrook e4f5fe8cf7
[syntax-errors] Duplicate type parameter names (#16858)
Summary
--

Detects duplicate type parameter names in function definitions, class
definitions, and type alias statements.

I also boxed the `type_params` field on `StmtTypeAlias` to make it
easier to
`match` with functions and classes. (That's the reason for the red-knot
code
owner review requests, sorry!)

Test Plan
--

New `ruff_python_syntax_errors` unit tests.

Fixes #11119.
2025-03-21 15:06:22 -04:00
..
snapshots Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
expression.rs Use the common `OperatorPrecedence` for the parser (#16747) 2025-03-21 09:40:37 +05:30
helpers.rs [syntax-errors] Improve error message and range for pre-PEP-614 decorator syntax errors (#16581) 2025-03-17 11:17:27 +00:00
mod.rs [syntax-errors] Parenthesized keyword argument names after Python 3.8 (#16482) 2025-03-06 12:18:13 -05: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] Duplicate type parameter names (#16858) 2025-03-21 15:06:22 -04:00
tests.rs Pass `ParserOptions` to the parser (#16220) 2025-02-19 10:50:50 -05:00