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:
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.
- Assistant
I’ll trace the formatter’s f-string handling and its tests, then patch the layout rule and run the focused suite plus any relevant build checks.
- Assistant
The break comes from the normal call-layout document being embedded unchanged inside
{…}. I’m adding a regression that also exercises the formatter’s existing parse-and-idempotence check, then I’ll force interpolation documents into the single-line rendering mode. - Assistant
The existing “next break” control only influences fit probing; it does not constrain the actual render mode, so it cannot guarantee valid f-strings. I’m introducing an internal forced-single-line document wrapper and applying it only to interpolation expressions.
- Assistant
The exact reported call now remains on one line even when its surrounding assignment pushes the line past the normal width. I’m validating the full formatter spec next, including idempotence/reparse checks for every formatter snapshot.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.