mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.13] gh-119933: Improve `SyntaxError
` message for invalid type parameters expressions (GH-119976) (#120641)
(cherry picked from commit 4bf17c381f
)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
parent
03b89e3a3d
commit
7c47f93dff
9 changed files with 277 additions and 55 deletions
|
@ -88,11 +88,11 @@ symtable_init_constants(PyObject *m)
|
|||
return -1;
|
||||
if (PyModule_AddIntConstant(m, "TYPE_ANNOTATION", AnnotationBlock) < 0)
|
||||
return -1;
|
||||
if (PyModule_AddIntConstant(m, "TYPE_TYPE_VAR_BOUND", TypeVarBoundBlock) < 0)
|
||||
return -1;
|
||||
if (PyModule_AddIntConstant(m, "TYPE_TYPE_ALIAS", TypeAliasBlock) < 0)
|
||||
return -1;
|
||||
if (PyModule_AddIntConstant(m, "TYPE_TYPE_PARAM", TypeParamBlock) < 0)
|
||||
if (PyModule_AddIntConstant(m, "TYPE_TYPE_PARAMETERS", TypeParametersBlock) < 0)
|
||||
return -1;
|
||||
if (PyModule_AddIntConstant(m, "TYPE_TYPE_VARIABLE", TypeVariableBlock) < 0)
|
||||
return -1;
|
||||
|
||||
if (PyModule_AddIntMacro(m, LOCAL) < 0) return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue