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

ci: refactor to use ruff and black non-local hooks #443

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

tekumara
Copy link
Collaborator

@tekumara tekumara commented Oct 21, 2023

to remove knowledge of .venv (which is determined by the Makefile) from the pre-commit hooks

this also seems to be more canonical (eg: black, ruff)

originally they were local so we could use them:

  1. in the makefile, but make check now calls pre-commit
  2. in vs code, which used to require they be installed in the venv, but now the black extension bundles a version (as the ruff extension always did)

the trade-off is that we won't have version parity between vs code and pre-commit (likewise, we don't already have this between pyright and pylance)

@tekumara tekumara merged commit da3fe64 into master Jan 9, 2024
2 checks passed
@tekumara tekumara deleted the non-local-hooks branch January 9, 2024 01:40
tekumara added a commit that referenced this pull request Jul 13, 2024
align with
[python-typed-template](https://github.com/tekumara/python-typed-template/tree/518252bdc6eaa21043b929e074a03c1da6126db2)

ruff is now installed into the venv rather than as a pre-commit hook,
reversing #443 and reintroducing knowledge of .venv into
.pre-commit-config.yaml. This is advantageous until [Dependabot supports
updating pre-commit
hooks](dependabot/dependabot-core#1524) and
also means `ruff check .` can be run locally.

toast: install hooks during install step so they are cached
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant