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

Latest version of ruff is pulled into tests but clashes with version in .pre-commit-hooks.yaml #149

Closed
abravalheri opened this issue Oct 25, 2024 · 1 comment · Fixed by #150

Comments

@abravalheri
Copy link
Contributor

This means that while we need to reformat some files to satisfy pytest-ruff, the pre-commit hook will not allow these changes to be committed.

The suggested solution is to bump the pre-commit hook.

@Avasam
Copy link
Contributor

Avasam commented Oct 25, 2024

Given pre-commit.ci isn't even used, I really feel like this is just maintenance burden (#109 (comment)). A [tox?] autofixing script/command would be just as useful locally, so this is just a nice to have for those who want to run the python "pre-commit" tool as a git pre-commit hook. Even then, you could either:
A) Let users configure their own hook with w/e tool they want. If it needs a custom config file (like .pre-commit-config.yaml), they can gitignore it like any other environment-specific file that the project doesn't make special use of.
B) The skeleton can provide a simple "local repo" hook that calls said autofixing command. Just as a welcome convenience for those who want to use the pre-commit tool as a git hook.

Even if you want to include CI autofixes at some point, my linked comment offers two alternatives that don't require keeping a duplicate list of dependencies in sync and doesn't require pinning to an exact version.

@abravalheri abravalheri changed the title Latest version of ruff is pulled into tests but clashes with version in .pre-commit-hooks,yaml Latest version of ruff is pulled into tests but clashes with version in .pre-commit-hooks.yaml Oct 25, 2024
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 a pull request may close this issue.

2 participants