gh-104572: Improve error messages for invalid constructs in PEP 695 contexts (#104573)

This commit is contained in:
Jelle Zijlstra 2023-05-17 06:05:42 -07:00 committed by GitHub
parent 0cb2fdc621
commit 97db2f3e07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 68 additions and 4 deletions

View file

@ -45,16 +45,16 @@
"assignment expression cannot be used in a comprehension iterable expression"
#define ANNOTATION_NOT_ALLOWED \
"'%s' can not be used within an annotation"
"%s cannot be used within an annotation"
#define TYPEVAR_BOUND_NOT_ALLOWED \
"'%s' can not be used within a TypeVar bound"
"%s cannot be used within a TypeVar bound"
#define TYPEALIAS_NOT_ALLOWED \
"'%s' can not be used within a type alias"
"%s cannot be used within a type alias"
#define TYPEPARAM_NOT_ALLOWED \
"'%s' can not be used within the definition of a generic"
"%s cannot be used within the definition of a generic"
#define DUPLICATE_TYPE_PARAM \
"duplicate type parameter '%U'"