File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 88
99import math
1010from collections .abc import Sequence
11- from typing import Callable , Union
11+ from typing import Callable , Union , cast
1212
1313from mypy .nodes import (
1414 ARG_NAMED ,
@@ -1027,8 +1027,8 @@ def constant_fold_expr_or_tuple(expr: Expression) -> ConstantValueOrTuple | None
10271027 return value
10281028 if not isinstance (expr , TupleExpr ):
10291029 return None
1030- folded : ConstantValueTuple = tuple (map (constant_fold_expr_or_tuple , expr .items ))
1031- return folded if None not in folded else None
1030+ folded = tuple (map (constant_fold_expr_or_tuple , expr .items ))
1031+ return cast ( ConstantValueTuple , folded ) if None not in folded else None
10321032
10331033 result = {}
10341034 for key_expr , value_expr in items :
You can’t perform that action at this time.
0 commit comments