[ruff] Autogenerate TypeParam nodes (#21028)

This commit is contained in:
Takayuki Maeda
2025-10-22 21:06:24 +09:00
committed by GitHub
parent 40148d7b11
commit 2c9433796a
37 changed files with 320 additions and 302 deletions

View File

@@ -605,10 +605,27 @@ fields = [{ name = "patterns", type = "Pattern*" }]
[TypeParam]
doc = "See also [type_param](https://docs.python.org/3/library/ast.html#ast.type_param)"
[TypeParam.nodes]
TypeParamTypeVar = {}
TypeParamTypeVarTuple = {}
TypeParamParamSpec = {}
[TypeParam.nodes.TypeParamTypeVar]
doc = "See also [TypeVar](https://docs.python.org/3/library/ast.html#ast.TypeVar)"
fields = [
{ name = "name", type = "Identifier" },
{ name = "bound", type = "Box<Expr>?" },
{ name = "default", type = "Box<Expr>?" },
]
[TypeParam.nodes.TypeParamTypeVarTuple]
doc = "See also [TypeVarTuple](https://docs.python.org/3/library/ast.html#ast.TypeVarTuple)"
fields = [
{ name = "name", type = "Identifier" },
{ name = "default", type = "Box<Expr>?" },
]
[TypeParam.nodes.TypeParamParamSpec]
doc = "See also [ParamSpec](https://docs.python.org/3/library/ast.html#ast.ParamSpec)"
fields = [
{ name = "name", type = "Identifier" },
{ name = "default", type = "Box<Expr>?" },
]
[ungrouped.nodes]
InterpolatedStringFormatSpec = {}