adafruit / Adafruit_CircuitPython_GPS

GPS parsing module for CircuitPython. Meant to parse NMEA data from serial GPS modules.
MIT License
75 stars 58 forks source link

update pre-commit conifiguration to avoid using the local escape hatch #71

Closed jkittner closed 2 years ago

jkittner commented 2 years ago

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?

jepler commented 2 years ago

related:

@theendlessriver13 can you help us out with improving future pre-commit files over in cookiecutter-adafruit-circuitpython?