mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-24 10:34:03 +03:00
aa12a5f967
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.
13 lines
550 B
Plaintext
13 lines
550 B
Plaintext
# The base set of requirements for REST framework is actually
|
|
# just Django, but for the purposes of development and testing
|
|
# there are a number of packages that are useful to install.
|
|
|
|
# Laying these out as separate requirements files, allows us to
|
|
# only included the relevant sets when running tox, and ensures
|
|
# we are only ever declaring our dependencies in one place.
|
|
|
|
-r requirements/requirements-optionals.txt
|
|
-r requirements/requirements-testing.txt
|
|
-r requirements/requirements-documentation.txt
|
|
-r requirements/requirements-packaging.txt
|