Avoid double formatting in mo.output.replace#9909
Open
lxingy3 wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
All contributors have signed the CLA ✍️ ✅ |
mscolnick
approved these changes
Jun 17, 2026
Author
|
I have read the CLA Document and I hereby sign the CLA |
95e3db8 to
ff3d9f8
Compare
Author
|
Rebased this on current Local checks: uv run --group test pytest tests/_runtime/output/test_output.py tests/_server/api/test_auth.py -q
uv run --group dev ruff check marimo/_runtime/output/_output.py tests/_runtime/output/test_output.py tests/_server/api/test_auth.pyThe PR diff is still limited to the output replacement fix and its regression test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #9681
mo.output.replace(value)was formattingvalueonce for the imperative output list and then again when broadcasting the cell output. This reuses theHtmlobject produced for the output list when sending the notification, so expensive_repr_html_/__panel__paths only run once.A regression test covers a probe object whose
_repr_html_increments a counter.Tests
python -m pytest tests\_runtime\output\test_output.py -qpython -m ruff check marimo\_runtime\output\_output.py tests\_runtime\output\test_output.pygit diff --check