Skip to content

Commit 7a1c0a9

Browse files
Update specialize.py
1 parent 308fbe8 commit 7a1c0a9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mypyc/irbuild/specialize.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,9 @@ def translate_fstring(builder: IRBuilder, expr: CallExpr, callee: RefExpr) -> Va
776776
elif isinstance(item, CallExpr):
777777
format_ops.append(FormatOp.STR)
778778
exprs.append(item.args[0])
779+
else:
780+
format_ops.append(FormatOp.STR)
781+
exprs.append(item)
779782

780783
def get_literal_str(expr: Expression) -> str | None:
781784
if isinstance(expr, StrExpr):

0 commit comments

Comments
 (0)