Skip to content

auto fixes from ruff#8393

Draft
Light2Dark wants to merge 2 commits intomainfrom
sham/ruff-fixes
Draft

auto fixes from ruff#8393
Light2Dark wants to merge 2 commits intomainfrom
sham/ruff-fixes

Conversation

@Light2Dark
Copy link
Collaborator

@Light2Dark Light2Dark commented Feb 20, 2026

📝 Summary

This is a slow migration to use the newest version of ruff which has more rules. https://github.com/astral-sh/ruff/releases
Ran uvx ruff check --fix. Went through the changes, they all look good.

🔍 Description of Changes

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Tests have been added for the changes made.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Pull request title is a good summary of the changes - it will be used in the release notes.

@vercel
Copy link

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Feb 23, 2026 6:34pm

Request Review

@Light2Dark Light2Dark added the internal A refactor or improvement that is not user facing label Feb 20, 2026
@Light2Dark Light2Dark marked this pull request as ready for review February 23, 2026 18:37
@Light2Dark Light2Dark requested review from manzt and mscolnick and removed request for dmadisetti February 23, 2026 18:38
@app.cell()
def _():
print("running internal tests")
return
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might consider disabling the rule that removes trailing returns.
We use return currently to delimit the end of a cell. So a cell like:

@app.cell
def _():
    print("running internal tests")
    # Some comments about the test we want to run
    # will get removed. Added whitespace too.




    return

May remove the comments/whitespace when formatting with ruff.
We've attempted to keep parity with ruff's formatting, and could probably support the stripped return when there is not whitespace on the last line.

def add(a: int, b: int) -> int:
return a + b

pass
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required for the failing test, but you could make this any expression

@mscolnick mscolnick requested review from manzt and removed request for manzt and mscolnick February 23, 2026 20:00
@Light2Dark Light2Dark marked this pull request as draft February 24, 2026 06:44
@dmadisetti
Copy link
Collaborator

I wouldn't mind revisiting this. My local ruff got bumped, and ran into this accidentally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants