mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-40334: Correctly identify invalid target in assignment errors (GH-20076)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
This commit is contained in:
parent
7ba1f75f3f
commit
16ab07063c
10 changed files with 137 additions and 45 deletions
|
@ -625,7 +625,7 @@ FAIL_SPECIALIZED_MESSAGE_CASES = [
|
|||
("(a, b): int", "only single target (not tuple) can be annotated"),
|
||||
("[a, b]: int", "only single target (not list) can be annotated"),
|
||||
("a(): int", "illegal target for annotation"),
|
||||
("1 += 1", "cannot assign to literal"),
|
||||
("1 += 1", "'literal' is an illegal expression for augmented assignment"),
|
||||
("pass\n pass", "unexpected indent"),
|
||||
("def f():\npass", "expected an indented block"),
|
||||
("def f(*): pass", "named arguments must follow bare *"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue