0002-misc-add-django-upgrade-files-notes-69798.patch
.git-blame-ignore-revs | ||
---|---|---|
12 | 12 |
877155f01d014e8fc778014c55e6a693247261f7 |
13 | 13 |
# misc: apply djhtml (#69419) |
14 | 14 |
dfdbaf2b8ab7202643701eb87edbdee1b1a137e4 |
15 |
# misc: apply django-upgrade (#69798) |
|
16 |
79aeb28367f565069f08b2180b765c48b9a58472 |
.pre-commit-config.yaml | ||
---|---|---|
1 | 1 |
# See https://pre-commit.com for more information |
2 | 2 |
# See https://pre-commit.com/hooks.html for more hooks |
3 | 3 |
repos: |
4 |
- repo: https://github.com/asottile/pyupgrade |
|
5 |
rev: v2.20.0 |
|
6 |
hooks: |
|
7 |
- id: pyupgrade |
|
8 |
args: ['--keep-percent-format', '--py37-plus'] |
|
9 |
- repo: https://github.com/adamchainz/django-upgrade |
|
10 |
rev: 1.10.0 |
|
11 |
hooks: |
|
12 |
- id: django-upgrade |
|
13 |
args: ['--target-version', '2.2'] |
|
4 | 14 |
- repo: https://github.com/psf/black |
5 | 15 |
rev: 22.3.0 |
6 | 16 |
hooks: |
... | ... | |
11 | 21 |
hooks: |
12 | 22 |
- id: isort |
13 | 23 |
args: ['--profile', 'black', '--line-length', '110'] |
14 |
- repo: https://github.com/asottile/pyupgrade |
|
15 |
rev: v2.20.0 |
|
16 |
hooks: |
|
17 |
- id: pyupgrade |
|
18 |
args: ['--keep-percent-format', '--py37-plus'] |
|
19 | 24 |
- repo: https://github.com/rtts/djhtml |
20 | 25 |
rev: 'v1.5.2' |
21 | 26 |
hooks: |
README | ||
---|---|---|
51 | 51 | |
52 | 52 |
djhtml --tabwidth 2 |
53 | 53 | |
54 |
There is .pre-commit-config.yaml to use pre-commit to automatically run black, |
|
55 |
isort, pyupgrade, and djhtml before commits. (execute `pre-commit install` |
|
56 |
to install the git hook.) |
|
54 |
django-upgrade is used to automatically upgrade Django syntax, using those parameters: |
|
55 | ||
56 |
django-upgrade --target-version 2.2 |
|
57 | ||
58 |
There is .pre-commit-config.yaml to use pre-commit to automatically run these tools |
|
59 |
before commits. (execute `pre-commit install` to install the git hook.) |
|
57 | 60 | |
58 | 61 | |
59 | 62 |
Copyright |
60 |
- |