Rename check to skip_validation in code mode API#8803
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the internal code mode context API to make disabling validation more explicit, discouraging casual use by renaming the parameter and strengthening its documentation.
Changes:
- Rename
get_context(..., check=...)toget_context(..., skip_validation=...)and invert the default accordingly. - Update
AsyncCodeModeContextto store/use_skip_validationinstead of_check. - Refresh documentation and validation error hints to reference
skip_validation.
Comments suppressed due to low confidence (1)
marimo/_code_mode/_context.py:886
- In
_dry_run_compile, the cycles error path still interpolates_check_false_hint, but that variable was renamed to_skip_hintabove. As written, hittingnew_cycleswill raise aNameErrorinstead of the intendedRuntimeErrormessage. Update the cycles error to use_skip_hint(or rename consistently).
if new_cycles:
raise RuntimeError(
f"Cycles detected: {new_cycles}{_check_false_hint}"
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agents were reaching for `check=False` too freely because the parameter name was innocuous and the docstring showed it as a normal usage pattern. Renaming to `skip_validation` makes the intent explicit and the new docstring frames it as an escape hatch rather than a routine option, which should discourage casual use.
3f25bea to
57ccaaf
Compare
mscolnick
approved these changes
Mar 20, 2026
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.
Agents were reaching for
check=Falsetoo freely because the parameter name was innocuous and the docstring showed it as a normal usage pattern. Renaming toskip_validationmakes the intent explicit and the new docstring frames it as an escape hatch rather than a routine option, which should discourage casual use.