Formatter rewrites Lisette f-strings to multiline interpolation that the compiler…
- User
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:
lisettef"You cannot use another ender pearl for {shared.format_duration( remaining, )}."The compiler reports:
text[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.
- Assistant
I’ll trace the formatter’s f-string handling, reproduce the rewrite with existing tests, then patch and run the focused test suite plus build checks.
- Assistant
rgisn’t installed here, so I’m switching tofind/grepand narrowing the search to formatter and parser sources. - Assistant
The formatter builds call arguments with breakable document nodes, and f-string interpolation currently embeds those nodes unchanged. I’m adding a document-level “must stay unbroken” boundary specifically around interpolation expressions, so compatible calls may exceed the width limit instead of becoming invalid syntax.
- Assistant
The regression now formats the outer function across lines while keeping
{shared.format_duration(remaining)}intact on one line; the formatter’s idempotence check also reparses that output successfully. I’m recording the snapshot, then I’ll run the complete formatter spec and compiler checks. - Assistant
A deeper printer check found two break mechanisms: strict argument breaks and nested formatting groups. I’m tightening the unbroken boundary so it propagates through both, and strengthening the regression to use multiple arguments—the case that definitely exercises automatic call wrapping.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.