Skip to content

Commit 6a896eb

Browse files
committed
Remove special logic only applicable to Parameters
1 parent ed9b41d commit 6a896eb

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

crates/ruff_python_ast/ast.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ fields = [
112112
[Expr.nodes.ExprLambda]
113113
doc = "See also [Lambda](https://docs.python.org/3/library/ast.html#ast.Lambda)"
114114
fields = [
115-
{ name = "parameters", type = "Parameters?" },
115+
{ name = "parameters", type = "Box<crate::Parameters>?" },
116116
{ name = "body", type = "Expr" }
117117
]
118118

crates/ruff_python_ast/generate.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"CmpOp",
2828
"Comprehension",
2929
"DictItem",
30-
"Parameters",
3130
"UnaryOp",
3231
"BoolOp",
3332
"Operator",
@@ -665,9 +664,7 @@ def write_node(out: list[str], ast: Ast) -> None:
665664
rust_ty = f"crate::{rust_ty}"
666665
if ty.slice_:
667666
rust_ty = f"[{rust_ty}]"
668-
if (
669-
ty.name in group_names or ty.name == "Parameters" or ty.slice_
670-
) and ty.seq is False:
667+
if (ty.name in group_names or ty.slice_) and ty.seq is False:
671668
rust_ty = f"Box<{rust_ty}>"
672669

673670
if ty.seq:

0 commit comments

Comments
 (0)