summaryrefslogtreecommitdiffstats
path: root/Grammar/python.gram
Commit message (Collapse)AuthorAgeFilesLines
* gh-142236: Improve error location for missing comma in string concatenations ↵Pablo Galindo Salgado2025-12-111-2/+1
| | | | (#142330)
* gh-138944: Fix `SyntaxError` message for invalid syntax following valid ↵Brian Schubert2025-10-261-2/+2
| | | | import-as statement (#138945)
* gh-138857: Improve error message for `case` outside of `match` (#138858)sobolevn2025-10-241-0/+4
| | | | | | | * gh-138857: Improve error message for `case` outside of `match` --------- Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
* gh-140253: Improve the syntax error from an ill-positioned double-star ↵Bartosz Sławecki2025-10-221-0/+5
| | | | subpattern (#140254)
* gh-138716: Fix `assert a := b` syntax error message (#138718)sobolevn2025-09-101-0/+8
|
* gh-136616: Improve `assert` syntax error messages (#136653)sobolevn2025-09-091-1/+14
|
* gh-137078: Fix keyword typo recognition when executed over files (#137079)Pablo Galindo Salgado2025-08-151-2/+4
|
* gh-132661: Disallow `Template`/`str` concatenation after PEP 750 spec update ↵Dave Peck2025-07-211-1/+10
| | | | | | | (#135996) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* gh-135422: Fix regression in `SyntaxError` messages after #134036 (#135423)sobolevn2025-06-301-1/+2
|
* gh-134036: Improve error messages for invalid `raise` statements (#134077)sobolevn2025-06-061-0/+6
|
* gh-133999: Fix `except` parsing regression in 3.14 (#134035)sobolevn2025-05-171-2/+2
|
* Remove trailing whitespace from python.gram (#133858)Rafael Fontenelle2025-05-141-15/+15
| | | | Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
* gh-133379: Fix misuse of the term "arguments" in error messages (GH-133382)Stan Ulbrych2025-05-101-14/+14
| | | The right term is "parameters".
* gh-133194: Fix regression with PEP 758 parsing on older `feature_version` ↵sobolevn2025-05-031-7/+11
| | | | | (#133289) gh-133192: Fix regression with PEP 758 parsing on older `feature_version`
* gh-123539: Improve SyntaxError msg for `import as` with not a name (#123629)sobolevn2025-05-021-6/+16
|
* gh-133196: Guard PEP 750 grammar with `CHECK_VERSION` (#133225)sobolevn2025-05-011-1/+6
|
* gh-133194: Add `CHECK_VERSION` to new PEP758 grammar (#133195)sobolevn2025-04-301-2/+10
|
* gh-132661: Implement PEP 750 (#132662)Lysandros Nikolaou2025-04-301-8/+51
| | | | | | | | | | | | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Wingy <git@wingysam.xyz> Co-authored-by: Koudai Aono <koxudaxi@gmail.com> Co-authored-by: Dave Peck <davepeck@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Paul Everitt <pauleveritt@me.com> Co-authored-by: sobolevn <mail@sobolevn.me>
* Remove trailing whitespace from python.gram (#133175)Rafael Fontenelle2025-04-301-5/+5
|
* gh-129858: Special syntax error for `elif` block after `else` (#129902)Steele Farnsworth2025-04-251-0/+1
|
* gh-132449: Improve syntax error messages for keywords with typos (#132450)Pablo Galindo Salgado2025-04-221-3/+9
| | | | Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-131831: Implement PEP 758 – Allow except and except* expressions ↵Pablo Galindo Salgado2025-04-011-8/+12
| | | | without parentheses (#131833)
* gh-129515: Clarify syntax error messages for conditional expressions (#129880)Sergey Miryanov2025-02-181-3/+16
| | | | | Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-125331: Allow the parser to activate future imports on the fly (#125482)Pablo Galindo Salgado2025-02-141-1/+1
|
* gh-88535: Improve syntax error for wrongly closed strings (#26633)Pablo Galindo Salgado2025-02-131-0/+3
|
* gh-122951: Simplify the grammar of the assignment rule (#124998)Rigel Di Scala2024-10-061-2/+2
|
* gh-123562: Improve `SyntaxError` message for `case ... as a.b` (#123563)sobolevn2024-09-021-1/+3
|
* gh-123440: Improve error message for `except as` used with not a name (#123442)sobolevn2024-08-301-3/+13
|
* gh-119724: Revert "bpo-45759: Better error messages for non-matching ↵Petr Viktorin2024-06-041-5/+0
| | | | | | 'elif'/'else' statements (#29513)" (#119974) This reverts commit 1c8f912ebdfdb146cd7dd2d7a3a67d2c5045ddb0.
* gh-118235: Move RAISE_SYNTAX_ERROR actions to invalid rules and make sure ↵Petr Viktorin2024-05-301-15/+23
| | | | | | | | they stay there (GH-119731) The Full Grammar specification in the docs omits rule actions, so grammar rules that raise a syntax error looked like valid syntax. This was solved in ef940de by hiding those rules in the custom syntax highlighter. This moves all syntax-error alternatives to invalid rules, adds a validator that ensures that actions containing RAISE_SYNTAX_ERROR are in invalid rules, and reverts the syntax highlighter hack.
* gh-118090: Improve error message for empty type param brackets (GH-118091)Nikita Sobolev2024-05-071-3/+12
|
* gh-116126: Implement PEP 696 (#116129)Jelle Zijlstra2024-05-031-3/+7
| | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-118323: Document `&&` grammar syntax (#118324)Nikita Sobolev2024-04-271-0/+3
|
* gh-116988: Remove duplicates of `annotated_rhs` in the Grammar (#117004)David Rubin2024-04-241-9/+9
|
* gh-118082: Improve `import` without names syntax error message (#118083)Nikita Sobolev2024-04-231-0/+4
|
* gh-109120: Fix syntax error in handlinh of incorrect star expressions (#117444)Grigoriev Semyon2024-04-021-2/+4
|
* bpo-24612: Improve syntax error for 'not' after an operator (GH-28170)Pablo Galindo Salgado2024-03-261-0/+7
| | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* gh-115881: Ensure `ast.parse()` parses conditional context managers even ↵Alex Waygood2024-02-261-1/+1
| | | | with low `feature_version` passed (#115920)
* gh-111488: Changed error message in case of no 'in' keyword after 'for' in ↵Grigoriev Semyon2024-01-061-0/+2
| | | | cmp (#113656)
* bpo-45759: Better error messages for non-matching 'elif'/'else' statements ↵Crowthebird2023-11-201-0/+5
| | | | (#29513)
* gh-111420: Allow type comments in parenthesized `with` statements (#111468)Tomas R2023-10-311-2/+2
|
* gh-110938: Fix error messages for indented blocks with functions and classes ↵Pablo Galindo Salgado2023-10-171-3/+3
| | | | with generic type parameters (#110973)
* gh-110696: Fix incorrect syntax error message for incorrect argument ↵Pablo Galindo Salgado2023-10-121-1/+2
| | | | unpacking (#110706)
* gh-109596: Ensure repeated rules in the grammar are not allowed and fix ↵Pablo Galindo Salgado2023-09-221-7/+4
| | | | incorrect soft keywords (#109606)
* gh-109114: Relax the check for invalid lambdas inside f-strings to avoid ↵Pablo Galindo Salgado2023-09-081-1/+1
| | | | false positives (#109121)
* gh-107015: Remove async_hacks from the tokenizer (#107018)Pablo Galindo Salgado2023-07-261-17/+17
|
* gh-98931: Add custom error messages to invalid import/from with multiple ↵Pablo Galindo Salgado2023-06-221-1/+1
| | | | | | targets (#105985) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-105194: Fix format specifier escaped characters in f-strings (#105231)Pablo Galindo Salgado2023-06-021-1/+1
|
* gh-104799: Move location of type_params AST fields (#104828)Jelle Zijlstra2023-05-261-6/+6
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104656: Rename typeparams AST node to type_params (#104657)Jelle Zijlstra2023-05-221-4/+4
|