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/interpolation layout logic, reproduce the failure with a focused test, then patch and run the relevant suite.
- Assistant
rgisn’t installed in this workspace, so I’m switching tofind/grepand narrowing the search to formatter sources and tests. - Assistant
The formatter builds interpolation expressions with the same breakable document nodes used everywhere else. I’ve confirmed the one-argument call path can therefore emit newlines inside
{…}. I’m adding an interpolation-only “single-line” rendering constraint, leaving normal call wrapping unchanged. - Assistant
The focused regression now formats the exact long call interpolation on one line and successfully re-parses the formatted output. All 293 formatter tests pass; I’m doing the final style and diff checks now.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.