Skip to content

Commit 28614c2

Browse files
pre-commit-ci[bot]BobTheBuidler
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 60ce737 commit 28614c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mypyc/irbuild/constant_fold.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ def constant_fold_expr(builder: IRBuilder, expr: Expression) -> ConstantValue |
8181
elif isinstance(expr, DictExpr):
8282
# NOTE: the builder can't simply use a dict constant like it can with other constants, since dicts are mutable.
8383
# TODO: make the builder load the dict 'constant' by calling copy on a prebuilt constant template instead of building from scratch each time
84-
folded = {constant_fold_expr(builder, key_expr): constant_fold_expr(builder, value_expr) for key_expr, value_expr in expr.items}
84+
folded = {
85+
constant_fold_expr(builder, key_expr): constant_fold_expr(builder, value_expr)
86+
for key_expr, value_expr in expr.items
87+
}
8588
if (
8689
len(folded) == len(expr.items)
8790
and None not in folded.keys()

0 commit comments

Comments
 (0)