Lint config cleaning#65
Conversation
Default config is imported from https://docs.astral.sh/ruff/configuration/
pre-commit/pre-commit-hooks#1034 > ### Deprecated / replaced hooks > - `check-byte-order-marker`: instead use fix-byte-order-marker > - `fix-encoding-pragma`: instead use [`pyupgrade`](https://github.com/asottile/pyupgrade)
de35fcd to
c8d549a
Compare
| @@ -1,3 +1,2 @@ | |||
| black | |||
There was a problem hiding this comment.
We're not going to replace black with ruff here at this stage...
This file is used for installing additional Python requirements within the container that are used for the development of Django and not provided in another existing requirements file in the Django source tree.
We need this so that we're able to run black on the Django source code itself.
| You can run individual tools by passing them as an argument: | ||
|
|
||
| ```console | ||
| $ docker compose run --rm pre-commit black | ||
| $ docker compose run --rm pre-commit blacken-docs | ||
| $ docker compose run --rm pre-commit isort | ||
| $ docker compose run --rm pre-commit flake8 | ||
| $ docker compose run --rm pre-commit eslint # XXX: Currently not working. | ||
| ``` | ||
|
|
There was a problem hiding this comment.
For that reason, we're not going to remove these instructions either.
(Note that the issues with eslint have been addressed and it now works.)
There was a problem hiding this comment.
I will, however, add some configuration for ruff for using in django-docker-box itself. Note that this will largely only affect settings.py for now, unless we add some other tooling or scripts later.
I will endeavour to configure ruff in a way that meets Django's coding style as much as possible, for consistency.
| @@ -1,3 +1,2 @@ | |||
| black | |||
| pre-commit | |||
There was a problem hiding this comment.
We could switch to prek here over pre-commit, but I won't right now. It's not as much of an issue as the black vs ruff thing because it pretty much works identically to pre-commit. It's just faster.
|
Superseded by #72. |
Several improvements related to the lint config and docs. The details can be found in commit messages.
Supersedes: