Skip to content

Conversation

hillairet
Copy link
Member

🎯 What needed to be done and why?

I noticed that the ruff pre-commit was pointing to the old repo org and seemed quite out of date. So I updated it.

In the process, I noticed that we may not be matching the flake8 checks that I believe ruff was supposed to replace.
According to the configuration docs here, only a few "E" and all the "F" rules are in the default config, but not the "W" and not the Macabe stuff that are default in flake8.
I just added all the "E" and "W" rules.

I tested on a freshly generated project and these new ruff rules pass successfully.

🆕 What is changed by this PR?

  • Switch to new repo location and latest version for pre-commit ruff
  • Extend the list of rules to include "W" and all "E" except the one excluded.

📋 Code Review Cheatsheet

What the reviewer should check
Check Description
🚚 Diff size Is the PR small and focused, or should it be broken into smaller PRs?
🧪 Unit tests Are new features covered with appropriate unit tests?
🥼 Acceptance Criteria met Are the Acceptance Criteria listed in the issue met?
🧐 Code clarity Is the code easy to understand? Are variable and function names meaningful?
🧩 Code organization Are files, modules, and functions structured logically?
🪚 Conciseness Is the code free of unnecessary complexity or redundant code?
💬 Comments & documentation Are code comments explaining why and not how? Is the documentation up-to-date?
🧮 Code consistency Does the code follow existing patterns and conventions in the project?
☣️ Function length Are functions too long? Should they be broken into smaller, more focused functions?
☢️ Class design Are classes well-structured and not overly large or doing too much?
🐾 Logging and debugging statements Are print/debug statements removed or replaced with proper logging?

@hillairet hillairet requested a review from rochecompaan August 11, 2025 17:52
@hillairet hillairet self-assigned this Aug 11, 2025
@hillairet hillairet changed the title Hillairet/update ruff in pre commit chore: update ruff in pre commit Aug 11, 2025
@rochecompaan
Copy link
Contributor

The updates to checks look good, but I'm surprised that the ruff check works for you. Did you run them before switching to the nix shell? We have to configure it to use the local ruff with repo: local because a nix shell won't allow the one from a virtualenv to run.

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.

2 participants