Skip to content

Commit 778e51f

Browse files
Update expression.py
1 parent e9297b7 commit 778e51f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mypyc/irbuild/expression.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import math
1010
from collections.abc import Sequence
1111
from functools import partial
12-
from typing import Callable, Union
12+
from typing import Callable, Union, cast
1313

1414
from mypy.nodes import (
1515
ARG_NAMED,
@@ -1029,7 +1029,9 @@ def constant_fold_expr_or_tuple(
10291029
return value
10301030
if not isinstance(expr, TupleExpr):
10311031
return None
1032-
folded = tuple(map(partial(constant_fold_expr_or_tuple, builder), expr.items))
1032+
folded: ConstantValueTuple = tuple(
1033+
map(partial(constant_fold_expr_or_tuple, builder), expr.items)
1034+
)
10331035
return folded if None not in folded else None
10341036

10351037
result = {}

0 commit comments

Comments
 (0)