update pre-commit conifiguration to avoid using the local escape hatch #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
using
repo: local
in pre-commit is considered an escape hatch, since it is not really portable and relies on the user to have the tools installed. pre-commit provides all the configuration options to be able to achieve what was previously done in bash, also much faster, since the files are now checked in parallel.I also run autoupdate and had to fix one pylint import error, where afterwards black did some formatting, where I personally don't agree on, but it's at least consistent 😄
We might also consider enabling pre-commit.ci instead of running it in gha, it's a CI tool build for pre-commit which is really fast, auto fixes formatting issue e.g. if a PR comes in a an black was not used, it applies it and commits the changes for you. the autoupdate is run weekly (can be configured differently) and a PR is created if there are newer version of the linters or code formatters.
Since pre-commit seems to be the default in all adafruit repos this might be an option for the whole organization?