Skip to content

Commit ab27873

Browse files
Update specialize.py
1 parent d4cb90f commit ab27873

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypyc/irbuild/specialize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,8 @@ def translate_fstring(builder: IRBuilder, expr: CallExpr, callee: RefExpr) -> Va
749749
for i, item in enumerate(items):
750750
if isinstance(item, StrExpr):
751751
continue
752-
elif isinstance(folded := constant_fold_expr(builder, item), str):
753-
items[i] = StrExpr(folded)
752+
elif (folded := constant_fold_expr(builder, item) is not None:
753+
items[i] = StrExpr(str(folded))
754754
continue
755755
elif isinstance(item, CallExpr):
756756
if not (

0 commit comments

Comments
 (0)