gh-104656: Rename typeparams AST node to type_params (#104657)

This commit is contained in:
Jelle Zijlstra 2023-05-21 21:25:09 -07:00 committed by GitHub
parent ef5d00a592
commit a5f244d627
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 290 additions and 287 deletions

View file

@ -640,12 +640,12 @@ type_alias[stmt_ty]:
# Type parameter declaration
# --------------------------
type_params[asdl_typeparam_seq*]: '[' t=type_param_seq ']' {
CHECK_VERSION(asdl_typeparam_seq *, 12, "Type parameter lists are", t) }
type_params[asdl_type_param_seq*]: '[' t=type_param_seq ']' {
CHECK_VERSION(asdl_type_param_seq *, 12, "Type parameter lists are", t) }
type_param_seq[asdl_typeparam_seq*]: a[asdl_typeparam_seq*]=','.type_param+ [','] { a }
type_param_seq[asdl_type_param_seq*]: a[asdl_type_param_seq*]=','.type_param+ [','] { a }
type_param[typeparam_ty] (memo):
type_param[type_param_ty] (memo):
| a=NAME b=[type_param_bound] { _PyAST_TypeVar(a->v.Name.id, b, EXTRA) }
| '*' a=NAME colon=":" e=expression {
RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind