Skip to content

Update ruff#37

Merged
micaeljtoliveira merged 4 commits intomainfrom
update_ruff
Feb 10, 2026
Merged

Update ruff#37
micaeljtoliveira merged 4 commits intomainfrom
update_ruff

Conversation

@micaeljtoliveira
Copy link
Copy Markdown
Member

@micaeljtoliveira micaeljtoliveira commented Feb 5, 2026

Closes #36

@micaeljtoliveira
Copy link
Copy Markdown
Member Author

@manodeep @minghangli-uni One of you keen is reviewing this? Should be simple.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (216bddc) to head (2616acc).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #37   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          455       455           
=========================================
  Hits           455       455           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@minghangli-uni
Copy link
Copy Markdown
Collaborator

Thanks @micaeljtoliveira for this update! This change resolves the immediate version mismatch, but I dont think it's ideal on its own. Updating .pre-commit-config.yaml to v0.15.0 resolves it for now but the root cause remains - we are still maintaining two independent ruff paths. To avoid future drift, I'd prefer to consolidate it so ci runs the same pre-commit hooks as the local does?

Would you mind if I push a couple of commits to this PR?

@micaeljtoliveira
Copy link
Copy Markdown
Member Author

@minghangli-uni Yes, this way there will be another mismatch in the future.

Would you mind if I push a couple of commits to this PR?

That depends on how you intent to solve the mismatch. I would like to avoid having the version fully pinned, as in that case there's no incentive to update it when new releases of ruff come out.

@minghangli-uni
Copy link
Copy Markdown
Collaborator

Thats fair - I am not suggesting we freeze ruff. The intent is to pin it in one place only, not multiple.

Using pre-commit keeps versions deterministic while still making upgrades easy through pre-commit autoupdate. That way ci and local runs stay aligned and formatting changes only happen when we intentially update but not implicitly via ci pulling a newer ruff.

@micaeljtoliveira
Copy link
Copy Markdown
Member Author

As long as the decision of when to update ruff is out of the developers' hands, I'm fine with whatever the scheme is. Feel free to push your commits and I'll see if I like what I see ;)

@minghangli-uni
Copy link
Copy Markdown
Collaborator

@micaeljtoliveira I've pushed the changes

@micaeljtoliveira
Copy link
Copy Markdown
Member Author

Thanks. Looks like the version is indeed fully pinned. I'm assuming your idea is to activate the pre-commit-ci app on this repo. I'm not a huge fan of having external apps creating PRs, but I can live with that. What's more annoying is not being able to have the auto-fix in the hook. Is there a way to avoid that?

@minghangli-uni
Copy link
Copy Markdown
Collaborator

Good question. What comes to my mind now is two options. One is to add something in the doc to tell people run these locally before pushing commits or when ci fails.

ruff format
ruff check --fix

Or to allow ci to push fixes automatically back to the branch?

@micaeljtoliveira
Copy link
Copy Markdown
Member Author

Good question. What comes to my mind now is two options. One is to add something in the doc to tell people run these locally before pushing commits or when ci fails.

ruff format
ruff check --fix

Yes, we should document this better. There should be a section about the hooks and what they do.
But documentation or not, one still needs to type the command explicitly.

Or to allow ci to push fixes automatically back to the branch?

That, for me, is a definite no, as I find these kind of commits to obscure and pollute the git history.

Okay, no need to waste any more time with this. Current solution is not perfect but will do. I'll clean the history of the branch and will let you have a final look and approve.

@minghangli-uni
Copy link
Copy Markdown
Collaborator

Okay, no need to waste any more time with this. Current solution is not perfect but will do. I'll clean the history of the branch and will let you have a final look and approve.

Agree! Thanks @micaeljtoliveira

@minghangli-uni
Copy link
Copy Markdown
Collaborator

Hi @micaeljtoliveira Just checking whether this is ready for review.

@micaeljtoliveira
Copy link
Copy Markdown
Member Author

@minghangli-uni Yes. I force-pushed the commits after a rebase, with some very minor changes to the history, last Friday. Should have pinged-up, sorry.

Copy link
Copy Markdown
Collaborator

@minghangli-uni minghangli-uni left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @micaeljtoliveira

@micaeljtoliveira micaeljtoliveira merged commit a99f1d6 into main Feb 10, 2026
8 checks passed
@micaeljtoliveira micaeljtoliveira deleted the update_ruff branch February 10, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI ruff format mismatch with local pre-commit

2 participants