ISSUE DESCRIPTION Formatter rewrites Lisette f-strings to multiline interpolation that…
- User
ISSUE DESCRIPTION
Formatter rewrites Lisette f-strings to multiline interpolation that the compiler rejects
lis buildrejects multiline interpolation expressions insidef"...{...}"strings, but Zed’s Lisette formatter appears to rewrite single-line calls across lines automatically.Example:
f"You cannot use another ender pearl for {shared.format_duration( remaining, )}."The compiler reports:
[error] Multi-line f-string interpolation ... error: f-string interpolations must be single-lineImpact:
lis buildfails after formatting in touched spots.- This forces manual one-line edits to pass build.
Expected:
- Either Lisette formatter should preserve single-line interpolation in compatible cases, or
- Formatter rules should be configured to avoid splitting interpolation argument expressions across lines.
Interface
No new interfaces are introduced.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
Assistant
I'll start by exploring the repository structure to understand what we're working with.
Assistant
Let me search for "f-string" handling in the codebase.
Assistant
Now let me find where multiline f-string error is generated:
Assistant
Let me check how this lexer is used. Where exactly does the lexer check for multiline interpolation?
Assistant
Now I understand. The lexer checks for newlines inside
{...}interpolations. Let me check the formatter:Assistant
Now I understand the formatter. Let me also look at the formatter in zed:
Assistant
Now let's reproduce the issue:
Assistant
Let me check the formatter tests:
Assistant
Now let me look at how the formatter is run as a test, to be able to verify my fix:
Assistant
Now let me build and test the formatter to confirm the bug:
Assistant
Hmm, that one didn't break. Let me test with a longer f-string:
Assistant
Reproduced the bug. Now let me check the
buildcommand:Assistant
OK, let me skip the build and just verify the lexer rejects the multi-line f-string:
Assistant
Let me see the lex test:
Assistant
Now let me understand the problem better. The lexer checks for newlines inside
{...}and reports an error. The formatter reformats calls into multi-line when they exceed certain length limits. Let me see what's happening when the formatter wraps:Assistant
Now I have a good understanding of the issue. Let me trace the formatter more carefully. Let me look at how
format_string(the format function for f-strings) interacts with the expression formatting:Assistant
Now let me understand how strict_break is used:
Assistant
Now I need to understand the issue better. The format_string function doesn't have a group around it, so when an expression in
{...}becomes too wide, the formatter has no choice but to break. The natural solution is to make sure that the interpolation in{...}stays on a single line. Let me think about this.Looking at the issue:
- The error says:
Multi-line f-string interpolation=>f-string interpolations must be single-line - The example is:
f"You cannot use another ender pearl for {shared.format_duration(remaining)}."gets rewritten to:
f"You cannot use another ender pearl for {shared.format_duration( remaining, )}."Looking at the format_string function, the simplest fix is to detect when we're inside an interpolation and prevent line breaks. The way to do this is to wrap the inner expression with a special construct that won't break.
Looking at the format logic, I see that:
format_call_with_headreturns a document with agroup()and a (which becomes a when broken).
- The error says:
Assistant
Assistant
Assistant
Assistant
Assistant
Assistant
Assistant
Assistant
OK so the comma separator between args is
strict_break(",", ", "). In unbroken mode it's", ". In broken mode it's",\n".OK now I have a clear picture. Let me implement the fix.
Let me also see the formatter format tests to make sure I understand the format:
Assistant
Let me look at the test infrastructure to understand:
Assistant
OK. Let me also write a quick test script to verify the issue:
Assistant
Now let me make the fix:
Assistant
Now I'll add the ForceUnbroken variant and modify the relevant logic.
Assistant
Now let me make the changes:
Assistant
Let me look at the exact lines:
Assistant
Hmm, the edit command format is different. Let me look at the existing help:
Assistant
Let me try with simpler edit:
Assistant
Hmm, the edit tool seems to have issues with the parameters. Let me try a different approach:
Assistant
Now let me modify
format_stringto wrap the inner expression inforce_unbroken:Assistant
Let me check the exact text:
Assistant
Now let me build and test:
Assistant
Hmm, parse error. Let me check:
Assistant
Assistant
OK my changes are there. Let me check that the build was using my changes:
Assistant
Hmm, the format crate wasn't rebuilt. Let me touch the file:
Assistant
Still broken. Let me trace through the logic carefully.
The formatted output:
println( f"You cannot use another ender pearl for {shared.format_duration( remaining_seconds_of_a_long_running_action, )}.", )So the inner call is broken (the argument is on a new line).
Assistant
I need to make ForceUnbroken actually force unbroken mode in format():
Assistant
Still broken. Let me trace more carefully.
Hmm, wait. Let me check the
is_inlinable_argfunction:Assistant
OK so
is_inlinable_argonly applies for certain expression types like Lambdas and Blocks. A regular Call likeshared.format_duration(...)is NOT considered inlinable unless arity is 1. Wait, it saysExpression::Call if arity == 1. So calls with one argument are inlinable. Hmm.Wait, but my
remaining_seconds_of_a_long_running_actionis just an identifier, not a Call. Sois_inlinable_argreturns false for it.Looking at format_call_with_head:
let Some((last, init)) = args .split_last() .filter(|(last, _)| is_inlinable_arg(last, args.len())) else { let entries = self.call_arg_entries(args); let (body, close_sep) = Self::join_pattern_entries(entries, None, ""); return head .append("(") .append(strict_break("", "")) .append(body) .nest(INDENT_WIDTH) .append(close_sep) .append(")") .group(); };So if the last arg is not inlinable, we take the else branch. The else branch creates a Group of the call. The body contains the args joined with strict_break(",", ", ").
Assistant
Let me look at the formatted output again. Hmm, it's possible that the ForceUnbroken wrapping isn't being reached. Let me add a debug print:
Assistant
Let me actually look at the formatted output structure more carefully. Let me check if ForceUnbroken is being applied:
Assistant
OK my changes are in place. Let me look at the format output. Let me trace this through the test:
Wait, I notice the formatted output is still the same as before. Let me check if my edit is in the right place. Let me look at
format_stringagain:Assistant
The format_string is correctly using force_unbroken. Let me make sure the binary is up to date:
Assistant
The binary is newer than the source files. So the binary should be up to date. But the output is still wrong. Let me run it again and verify:
Assistant
Still broken. Let me look at the actual flow again. The format_string is the inner expression. So it's part of
self.expression(e)for the literal format string.Wait! Let me look at this carefully.
format_stringis called fromself.literal(). Theformat_stringreturns the formatted doc. Thenself.expression(e)returns the format_string doc.But what is
einself.expression(e)forFormatStringPart::Expression(e)? It's the Expression inside the{}. Soeis the call expressionshared.format_duration(...). The formatter callsself.expression(e)on it, which returns the Group for the call. Then we wrap it in force_unbroken.So the format_string contains:
f", text,{, ForceUnbroken(call Group),}, text,".OK let me actually trace what happens. Let me add some debug output:
Assistant
OK so when we call
self.expression(e)for the Call expression, it returns the call Group. Then.force_unbroken()wraps it.But hmm, the format_string wraps the result. Then the format_string is the literal expression. The literal is then returned from
self.expressionfor the format string expression (which contains the literal).Actually wait. Let me re-check. The
einFormatStringPart::Expression(e)is the Expression inside{...}. So:self.expression(e)returns the call Group..force_unbroken()wraps it.
Then this is added to the format_string docs.
Let me check what's actually happening. Let me check if the call expression gets formatted correctly:
Assistant
Assistant
Assistant
Now the inner call is unbroken. Let me also test the round-trip to make sure it doesn't break the lexer:
Assistant
The output is now stable and the formatting is idempotent.
But wait, I should also check the case where the f-string itself is super long. Let me test:
Assistant
The inner call is still single line.
Now let me run the existing format tests to make sure I didn't break anything:
Assistant
Hmm, no tests for lisette-format. Let me check the test infrastructure:
Assistant
Hmm, these are emit tests that are failing. Let me check what's going on:
Assistant
All format tests pass! The failures are emit tests that use Go output formatting. Let me check what's failing:
Assistant
Hmm, the test failure is interesting. The diff shows:
-old snapshot +new resultsBut looking at the diff, the actual difference is:
- old:
func test() {,name := "Alice", etc. (formatted Go) - new:
func test () {,name := "Alice", etc. (different Go format)
Wait, but these are emit tests, not format tests. Let me look:
- old:
Assistant
Hmm, the snap looks fine. Let me check the actual
.snap.new:Assistant
Hmm. The expected was the formatted Go (with
gofmt-style indentation), but the new output is just the raw emit (unformatted Go).This means the test pipeline expects Go to be available for the actual formatting. Without Go, the emit is unformatted. Let me check the test setup:
Assistant
So this is an emit test, and the diff is about Go formatting. Let me check
assert_emit_snapshot:Assistant
OK so the tests rely on
gofmtbeing installed. Since I don't have Go installed, the test fails becausegofmtcan't format the output.So these emit test failures are NOT caused by my changes - they are caused by Go not being installed in the environment. Let me verify by reverting my changes and running:
Assistant
Good - the test also fails without my changes. So the failure is unrelated. Let me restore my changes:
Assistant
Good. Now let me make sure my changes don't break any format tests:
Assistant
All 292 format tests pass. Now let me also run all the tests in the suite that don't depend on go:
Assistant
Let me run other tests too:
Assistant
Let me also check the desugar tests:
Assistant
Now let me also try some edge cases:
Assistant
All these cases work correctly. The interpolation expressions stay on single lines. Let me also test with comments:
Assistant
OK that's a parse error (the user wrote invalid Lisette). Good.
Let me also test what happens when the f-string itself is super long and wraps:
Assistant
The outer println is broken (because of length) but the interpolation expression stays on a single line.
Let me also test f-strings with multiple interpolations where one is long:
Assistant
Multiple interpolations also stay single-line.
Let me also test the multiline f-string case (text with
\n):Assistant
That round-trip works.
Let me also test what happens when interpolation expression contains a lambda:
Assistant
Hmm, the lambda body still breaks. The lambda's
{...}is a block, and inside the lambda body, the formatter adds newlines for the block.Wait, this is a problem. The lambda
{ x + 1 }becomes:|x| { x + 1 }So the lambda body has a newline. But the f-string interpolation shouldn't have newlines.
Let me check the issue:
Assistant
So the lambda body is just
self.expression(body). The body is a Block expression. Let me look at the Block expression formatter:Assistant
Assistant
So
Document::Newlineand.force_break()are used in:blockfunction - block expressions with{ ... }pipelineformatting - pipelines can wrap
Let me look at the pipeline:
Assistant
So pipelines have Document::Newline too.
OK so for the general fix, I need to ensure that within a format string interpolation, no Document::Newline is rendered, and no Group is broken.
Let me approach this differently. I'll add a flag to the Formatter that tracks when we're inside a format string interpolation. When this flag is set, the formatter should avoid producing unconditional newlines and avoid breaking groups.
Actually, wait. Looking at the issue, the primary concern is that the formatter wraps the interpolation expression. Let me check if my fix handles the most common case (function calls). The lambda case is a corner case.
Let me look at the current state of my fix:
Assistant
The example from the issue is now formatted correctly without breaking the interpolation.
But the lambda case is still broken. Let me think about whether to address it.
Looking at the lambda case:
- Input:
f"value: {foo(|x| { x + 1 })}" - Output:
f"value: {foo(|x| {\n x + 1\n})}"
The issue is that the lambda body block has unconditional newlines.
Hmm, but realistically, lambdas in f-string interpolations are unusual. Let me focus on the most common case first.
But wait, let me also check if match expressions break:
- Input:
Assistant
Assistant
Hmm, modifying Document::Newline would be invasive. Let me think of a cleaner approach.
Actually, looking at the problem again: the formatter already correctly handles the case where the interpolation expression is just a function call (which is the most common case). The lambda case is a more complex expression where the formatter has its own opinions about formatting (e.g., always wrap the body in newlines).
The issue says:
Either Lisette formatter should preserve single-line interpolation in compatible cases, or
- Formatter rules should be configured to avoid splitting interpolation argument expressions across lines.
So the formatter should avoid splitting interpolation expressions. My current fix handles the function call case, which is the example given.
But to be more thorough, let me think about whether we should also handle the lambda case. Actually, in practice, lambdas in f-string interpolations are unusual. The user is more likely to use:
Assistant
Only one test with f-string. So the lambda/match cases aren't tested.
Let me think about whether to add support for these. Looking at the issue example, it's just a function call. So my current fix handles the main case.
But the principle is "no newlines in interpolation". So let me try to handle this more comprehensively.
Let me try to suppress Document::Newline in ForcedUnbroken mode:
Assistant
Lambda now stays on one line. Let me test match:
Assistant
Match also works (though the formatting is a bit ugly with the trailing comma). Let me test the main case:
Assistant
Let me also test the multiline text in f-string:
Assistant
Multiline text still works (because VerbatimText is rendered as-is, not via Newline).
Let me run the format tests:
Assistant
All 292 format tests pass. Let me run the full suite:
Assistant
The 1588 failures are all emit tests that depend on
gofmtwhich isn't installed. Let me verify by running just the format/parse/lex/infer/desugar tests:Assistant
Build tests likely also depend on Go. Let me confirm:
Assistant
Confirmed - the failures are unrelated to my changes (they exist without my changes too, due to missing Go).
Assistant
Let me clean up the .new files:
Assistant
Now let me also test some other edge cases:
Assistant
All these stay on single lines. Let me check if the lambda case is now correctly handled:
Assistant
Lambda works too. Let me also test pipeline:
Assistant
Pipeline stays on one line. Hmm, the spacing is a bit off but no newlines.
Let me also test a case where the interpolation expression has multiple lines naturally:
Assistant
Now let me also check the issue from the original report:
Assistant
OK that's an invalid top-level expression. Let me test with a wrapper:
Assistant
Parse error because the multiline is invalid syntax. Now the formatter would refuse to format such files (which is correct).
Assistant
The formatted output is valid syntax (single-line interpolation) and won't be rejected by the lexer.
Now let me also think about edge cases. What if the f-string is so long that the format_string itself wraps?
Assistant
All interpolations are single line.
Let me also test the edge case where the interpolation expression itself contains an f-string:
Assistant
Nested f-string works.
Let me also test with comments in interpolations (which might be invalid):
Assistant
Let me also test the original issue example more directly:
Assistant
Let me also test what happens when the line is short enough that println doesn't wrap:
Assistant
Short case stays as is.
Let me also do a roundtrip test:
Assistant
Idempotent.
Let me run all format tests one more time:
Assistant
All 292 format tests pass. Let me also check the test that was specifically for f-string:
Assistant
All the format_string_* failures are in the emit module (gofmt-dependent). Let me verify by looking at one of the tests:
Assistant
The format tests pass.
Let me also check the formatter tests within the formatter crate:
Assistant
All 25 tests in the format crate pass.
Let me look at the final changes:
Assistant
Now let me verify the issue is actually resolved by re-reading the example from the issue:
Assistant
The formatter no longer breaks the interpolation expression. The interpolation
{shared.format_duration(remaining)}stays on a single line. Theprintln(...)itself is wrapped because the total line is too long, but the interpolation inside is intact.Let me also verify the lexer accepts the formatted output:
Assistant
Actually, let me just test this by running format on the output:
Assistant
The formatted output passes format --check, which means it parses successfully.
Let me also test the multiline f-string case where the user wrote it on one line and the formatter should preserve:
Assistant
Multiline text stays as-is because the user used
\n(escaped) and not actual newlines.Now let me run the full format tests one more time and make sure everything is OK:
Assistant
All format tests pass.
Let me also verify the lib tests:
Assistant
All non-Go-dependent tests pass. The Go-dependent tests (emit, build) fail because Go isn't installed, but this is unrelated to my changes (verified by stashing my changes earlier).
Now let me think about whether there are any other edge cases I might have missed.
Let me think about what happens when the lambda body uses
force_break:Assistant
Lambda body outside interpolation works normally.
Let me also test what happens if I do this with the lambda IN the interpolation:
Assistant
Hmm, the formatter strips newlines but leaves the statements concatenated without semicolons. That's because the newlines between statements were removed (since we suppressed them), but the semicolons weren't added. Let me check what happens normally:
Assistant
OK so normally the formatter doesn't add semicolons. Newlines are sufficient. With my fix, the newlines are removed, leaving the statements concatenated. Let me think about how to handle this.
Actually, looking at the lambda body, in normal formatting, the statements are separated by newlines (no semicolons needed). When I suppress newlines, I get
let y = 1let z = 2which is invalid syntax. This is a problem.Let me check what the lambda body looks like normally:
Assistant
So in a normal block, statements are separated by newlines. In an interpolation context, my fix suppresses those newlines, leading to invalid syntax.
I need a different approach. Let me think.
Option 1: Replace Document::Newline with a space when in ForcedUnbroken mode. Option 2: Replace Document::Newline with "; " (semicolon + space) when in ForcedUnbroken mode.
Actually, in Lisette, statements are separated by newlines (no semicolons). So we need newlines OR semicolons. If we suppress newlines in ForcedUnbroken mode, we need to add semicolons.
But the formatter doesn't track which Documents are statements. It just produces Documents with newlines.
Hmm, this is getting complex. Let me think of another approach.
Alternative approach: Instead of trying to make complex expressions work in interpolations, just make the formatter use a higher line width when formatting inside an interpolation.
Wait, actually, the simplest approach is: when inside an interpolation, use a "no newlines" policy that replaces Document::Newline with a space. This way, statements get separated by spaces, which is still readable but doesn't introduce actual newlines.
Let me try:
Assistant
Let me modify it to add a space:
Assistant
OK so statements are now separated by spaces. The output is
let y = x + 1 let z = y * 2 zwhich has spaces between statements. This should be valid Lisette syntax. Let me verify:Assistant
The formatted output is valid.
Let me also test the original issue example:
Assistant
Lambda with a single statement works fine.
Assistant
Match works too. Let me also test pipeline:
Assistant
Pipeline works.
Let me run all the format tests once more:
Assistant
All 292 format tests still pass.
Let me also run other tests:
Assistant
All tests pass.
Now let me also check the crate-level tests:
Assistant
All 25 tests pass.
Let me think about whether there are any other edge cases I should consider:
- Nested f-strings - tested, works
- Multiple interpolations - tested, works
- Long interpolation expressions - tested, works
- Lambda with multi-statement body in interpolation - tested, works (separated by spaces)
- Match expression in interpolation - tested, works
- Pipeline in interpolation - tested, works
- Empty interpolation - shouldn't be possible
- Interpolation with comment - depends on where the comment is
Let me test interpolation with comments:
Assistant
Now let me also think about the case where the formatter would normally split a call into multiple lines because of a comment:
Assistant
Good, comments outside the interpolation work as expected.
Let me also think about a complex case:
Assistant
Let me now also run all of the format tests one more time to make sure:
Assistant
All format tests pass.
Let me also think about whether my fix could affect anything outside f-string interpolation. The
force_unbrokenconstructor is only called fromformat_string, so it should only be applied to interpolation expressions. The ForcedUnbroken mode propagates down through Document::Group, but this is fine because ForcedUnbroken is only set by ForceUnbroken.Let me check if ForceUnbroken mode could be set elsewhere:
Assistant
Let me look at line 75, 79, 212:
Assistant
So NextBreakFits(false) sets mode to ForcedUnbroken in fits(). And NextBreakFits is also used by some other constructs. Let me check whether my modifications to Group handling affect NextBreakFits(false) usage.
NextBreakFits(false) in fits() pushes with ForcedUnbroken mode. The inner content is checked with ForcedUnbroken. Group in ForcedUnbroken mode (in fits()) just passes through. This was the existing behavior.
NextBreakFits(false) in format() is a no-op (just unwraps). So format() doesn't have my changes affect NextBreakFits usage.
Now let me also check: what does Group do in format() when mode is ForcedUnbroken (which is set by ForceUnbroken)?
Document::Group(doc) => { if matches!(mode, Mode::ForcedBroken | Mode::ForcedUnbroken) { docs.push((indent, mode, doc)); } else { ... } }So Group in ForcedUnbroken mode in format() passes through with ForcedUnbroken mode. The inner is processed in ForcedUnbroken mode.
The inner Group is also in ForcedUnbroken mode (passing through). The inner's StrictBreaks are unbroken. Document::Newline becomes a space (with my modification).
So everything inside the ForceUnbroken wrapping is rendered as forced unbroken.
Assistant
So
nest_if_broken(INDENT_WIDTH)adds indentation only if broken. In ForcedUnbroken mode, no indentation. Good.Let me also check
format_method_chain_with_root:Assistant
Good,
nest_if_brokenis used for method chains too.Let me also test that long lines still wrap correctly when the interpolation is short:
Assistant
Looks good.
Let me also verify that the multiline text case still works:
Assistant
Multiline text works.
Let me also test an empty interpolation (shouldn't really happen but let's check):
Assistant
OK parse error, expected.
Let me also run the full format tests one final time:
Assistant
All format tests pass.
Let me also verify that the formatter doesn't accidentally break something else. Let me look at the full diff one more time:
Assistant
The changes are minimal and focused.
Let me also think about whether to add a test for the f-string interpolation. Wait, the instructions say not to modify or add tests. Let me re-read:
UNDER NO CIRCUMSTANCES should you modify existing tests or add new tests to the repository.
OK so I shouldn't add tests. But I can create a temporary script to verify. Let me do one more verification:
Assistant
The issue is fixed:
- The formatter no longer breaks the interpolation expression
- The output is valid Lisette syntax (passes format --check)
- The output is idempotent (formatting twice gives the same result)
Let me also run the format and lex tests one more time to confirm everything is fine:
Assistant
All tests pass.
Let me now run the entire format crate test suite:
Assistant
All tests pass.
Let me also double-check by reviewing the issue description once more:
Formatter rewrites Lisette f-strings to multiline interpolation that the compiler rejects
My fix ensures the formatter does NOT break the interpolation expression across lines.
lis buildrejects multiline interpolation expressions insidef"...{...}"stringsThe lexer rejects newlines in
{...}. My fix prevents the formatter from introducing such newlines.Expected:
- Either Lisette formatter should preserve single-line interpolation in compatible cases, or
- Formatter rules should be configured to avoid splitting interpolation argument expressions across lines.
My fix achieves the second: the formatter never splits the interpolation expression across lines.
The checklist:
- ✅ If an error was reported in the issue description, I have successfully reproduced it.
- ✅ If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- ✅ I have thought about edge cases and made sure my fix handles them as well.
Assistant
Let me clean up these snap.new files:
Assistant
Only the two files I modified. Let me look at the final diff:
Assistant
The changes are minimal and focused:
-
crates/format/src/formatter/expression.rs: Wrap the inner expression informat_stringwith.force_unbroken()to ensure the formatter never introduces newlines inside the interpolation. -
crates/format/src/lindig.rs:- Add a new
ForceUnbrokenvariant to theDocumentenum. - Add a
force_unbroken()constructor method. - Handle
ForceUnbrokeninfits()(push with ForcedUnbroken mode). - Handle
ForceUnbrokeninformat()(push with ForcedUnbroken mode). - Modify
Document::Grouphandling informat()to respect ForcedUnbroken mode (don't try to fit). - Modify
Document::Newlinehandling informat()to replace the newline with a space when in ForcedUnbroken mode.
- Add a new
These changes ensure that:
- Function call expressions in f-string interpolations stay on a single line.
- Lambda expressions, match expressions, and other complex expressions in f-string interpolations also stay on a single line (with multi-statement bodies separated by spaces instead of newlines).
-
Assistant
Let me run the tests one final time to confirm everything is in order:
Assistant
All tests pass. Let me also do one final verification with the exact example from the issue:
Assistant
The issue is fixed. The formatter no longer breaks the interpolation expression, and the formatted output passes the format --check (which means it's valid Lisette syntax).
Now let me submit my changes:
Assistant
My final changes summary:
crates/format/src/formatter/expression.rs: +7/-1 linescrates/format/src/lindig.rs: +44/-8 lines
The total diff is small and focused on the issue.
Summary
Issue: The Lisette formatter rewrites single-line f-string interpolations to multi-line expressions that the compiler rejects with "Multi-line f-string interpolation" error.
Root cause: The formatter has no awareness that the contents of an f-string interpolation
{...}must remain on a single line. When the interpolation expression (e.g., a function call) is too long to fit on the same line as the surrounding f-string, the formatter wraps it across multiple lines.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.