Description
Discussed during the weekly CP call that running pylint on local changes would be of value to library contributors. This would make the pre-commit process a "one-stop-shop" for running formatting, performing validations, etc. This mostly involves adding the steps to the .pre-commit-config.yaml, with some caveats (below).
One concern mentioned by @jepler during the call was that it adds a required tool as part of the execution environment - both for contributors as well as within the CI pipeline. @tannewt mentioned the possibility of there being a requirements.txt like file for development environments within pip, possibly dev-requirements.txt.
There was also a heads-up from @kattni to make sure that the revision value for the pre-commit hook can NOT be "latest" or "current". Rather, it MUST have a proper version/tag number, i.e. "v0.2".
Finally, part of the changes would be to the generated GitHub workflow (/.github/workflows/build.yml
) and remove the calls to pylint, since they would be performed by pre-commit from within the generated .pre-commit-config.yaml.
Reference: CircuitPython Weekly for 16 February 2021