ruff/crates/ruff_python_parser/src
Abhijeet Prasad Bodas f5096f2050
[parser] Flag single unparenthesized generator expr with trailing comma in arguments. (#17893)
Fixes #17867

## Summary

The CPython parser does not allow generator expressions which are the
sole arguments in an argument list to have a trailing comma.
With this change, we start flagging such instances.

## Test Plan

Added new inline tests.
2025-05-07 14:11:35 -04:00
..
lexer Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
parser [parser] Flag single unparenthesized generator expr with trailing comma in arguments. (#17893) 2025-05-07 14:11:35 -04:00
snapshots Raise syntax error when \ is at end of file (#17409) 2025-04-15 21:26:12 +05:30
error.rs Make syntax error for unparenthesized except tuples version specific to before 3.14 (#17660) 2025-04-29 07:55:30 -05:00
lexer.rs Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
lib.rs [red-knot] Add basic on-hover to playground and LSP (#17057) 2025-04-04 08:13:43 +02:00
semantic_errors.rs [syntax-errors] Use consistent message for bad starred expression usage. (#17772) 2025-05-01 20:18:35 +02: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 Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
typing.rs Rename ExprStringLiteral::as_unconcatenated_string() to ExprStringLiteral::as_single_part_string() (#16253) 2025-02-19 16:06:57 +00:00