Commit Graph

3 Commits

Author SHA1 Message Date
Christian Clauss
6cbd4b7789
GitHub Actions: Upgrade pre-commit and drop the removed token (#9267)
* https://github.com/pre-commit/action/releases
* https://github.com/actions/checkout/releases
* https://github.com/actions/setup-python/releases

https://github.com/pre-commit/action#using-this-action-in-private-repositories explains why `token` was removed but is a bit difficult to understand.

Moving to running pre-commit on https://pre-commit.ci has proved to be the best solution on other projects.
2024-03-06 14:27:46 +01:00
Samiul Sk
8b7e6f2e34
Update pre-commit.yml (#9012) 2023-06-20 17:43:33 +06:00
Adam Johnson
aa12a5f967
Lint with pre-commit (#7900)
Following [my comment here](https://github.com/encode/django-rest-framework/pull/7589#issuecomment-813301322) and [Django's own move to pre-commit](https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/#pre-commit-checks).

* Add pre-commit config file to run flake8 and isort.
* Add extra "common sense" hooks.
* Run pre-commit on GitHub actions using the [official action](https://github.com/pre-commit/action/). This is a good way to get up-and-running but it would be better if we activated [pre-commit.ci](https://pre-commit.ci/), which is faster and will auto-update the hooks for us going forwards.
* Remove `runtests.py` code for running linting tools.
* Remove `runtests.py --fast` flag, since that would now just run `pytest -q`, which can be done with `runtests.py -q` instead.
* Remove tox configuration and requirements files for linting.
* Update the contributing guide to mention setting up pre-commit.
2021-04-05 12:08:52 +01:00