Skip to content

Commit 7faccbc

Browse files
Update for_helpers.py
1 parent 1e8c7fe commit 7faccbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypyc/irbuild/for_helpers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
NameExpr,
2323
RefExpr,
2424
SetExpr,
25+
StarExpr,
2526
StrExpr,
2627
TupleExpr,
2728
TypeAlias,
@@ -1194,7 +1195,7 @@ def get_expr_length(expr: Expression) -> int | None:
11941195
elif isinstance(expr, (ListExpr, TupleExpr)):
11951196
# if there are no star expressions, or we know the length of them,
11961197
# we know the length of the expression
1197-
stars = [get_expr_length(i, context) for i in expr.items if isinstance(i, StarExpr)]
1198+
stars = [get_expr_length(i) for i in expr.items if isinstance(i, StarExpr)]
11981199
if None not in stars:
11991200
other = sum(not isinstance(i, StarExpr) for i in expr.items)
12001201
return other + sum(stars)

0 commit comments

Comments
 (0)