Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update ruff version in pre-commit hook #8746

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anakin87
Copy link
Member

Related Issues

While investigating formatting issues in #8745,
I noticed an inconsistency:

  • we are pinning ruff in our pre-commit hook
  • our format job in test workflow uses the latest version of ruff

This can sometimes create this cycle:

  • the format job fails
  • you manually try to fix the format using hatch run format (because pre-commit hook did not take care of it)
  • the pre-commit hook reverts changes
  • ♾️

Proposed Changes:

  • pin ruff to 0.9.2 in the pre-commit hook
  • unfortunately, there is no way to depend on the latest version (pre-commit docs)

Notes for the reviewer

In the long run, there could be better ways to fix this problem, such as running pre-commit autoupdate in the CI or pinning ruff also in our pyproject file.

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes
  • I added unit tests and updated the docstrings
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I documented my code
  • I ran pre-commit hooks and fixed any issue

@anakin87 anakin87 requested a review from a team as a code owner January 17, 2025 18:09
@anakin87 anakin87 requested review from vblagoje and removed request for a team January 17, 2025 18:09
@github-actions github-actions bot added the topic:DX Developer Experience label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:DX Developer Experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant