gh-110696: Fix incorrect syntax error message for incorrect argument unpacking (#110706)

This commit is contained in:
Pablo Galindo Salgado 2023-10-12 10:02:02 +01:00 committed by GitHub
parent ec5622d197
commit 3d180347ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 2447 additions and 2081 deletions

View file

@ -1955,6 +1955,17 @@ Invalid expressions in type scopes:
...
SyntaxError: yield expression cannot be used within the definition of a generic
>>> f(**x, *y)
Traceback (most recent call last):
SyntaxError: iterable argument unpacking follows keyword argument unpacking
>>> f(**x, *)
Traceback (most recent call last):
SyntaxError: iterable argument unpacking follows keyword argument unpacking
>>> f(x, *:)
Traceback (most recent call last):
SyntaxError: invalid syntax
"""
import re