chore(ruff): standardize optional union ordering - #10845
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Light2Dark
marked this pull request as ready for review
September 15, 2026 05:21
Light2Dark
enabled auto-merge (squash)
September 15, 2026 05:22
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A remaining RUF036 violation prevents make check from passing.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This pull request standardizes optional union ordering and enables Ruff’s RUF036 check.
Changes:
- Removes
RUF036from Ruff’s global ignore list. - Reorders
Nonein affected unions across 12 Python files. - A remaining violation prevents
make checkfrom passing.
File summaries
| File | Description |
|---|---|
pyproject.toml |
Enables RUF036. |
marimo/_utils/lists.py |
Reorders the as_list union. |
marimo/_utils/env.py |
Reorders the environment value union. |
marimo/_server/ai/mcp/types.py |
Reorders the recursive MCP value union. |
marimo/_schemas/export.py |
Reorders the export layout union. |
marimo/_save/loaders/lazy.py |
Reorders loader unions. |
marimo/_runtime/packages/import_error_extractors.py |
Reorders the exception union. |
marimo/_runtime/dataflow/graph.py |
Reorders the graph copy parameter union. |
marimo/_output/formatters/structures.py |
Reorders the formatter return union. |
marimo/_messaging/notification.py |
Reorders the notification serialization union. |
marimo/_lint/diagnostic.py |
Reorders the diagnostic cell ID union. |
marimo/_ast/pytest.py |
Reorders pytest helper parameter unions. |
Review details
- Files reviewed: 12/12 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -389,7 +389,6 @@ ignore = [ | |||
| "FURB189", # Subclassing built-in collections | |||
| "FURB152", # Replace literal with a math constant | |||
| "FURB110", # Replace ternary with an `or` expression | |||
mscolnick
approved these changes
Sep 15, 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.
This pull request was authored by a coding agent.
📝 Summary
Enable Ruff’s
RUF036check and remove it from the global ignore list.Optional type unions now place
Nonelast, giving annotations a consistent shape and preventing new ordering drift. This is an annotation-only change; unions used bymsgspecremain unambiguous because theirNonebranch does not overlap the other variants.Ruff 0.16.7, focused serialization and export tests, and
make checkpass.📋 Pre-Review Checklist
✅ Merge Checklist