0003-misc-add-django-upgrade-files-notes-69426.patch
.git-blame-ignore-revs | ||
---|---|---|
8 | 8 |
7bc0fcadffd16564cc200cb2f32fae80b3c3a5cf |
9 | 9 |
# misc: apply black 22.1.0 |
10 | 10 |
09c2a08d113b2194697fc0a3925d569184babe97 |
11 |
# misc: apply django-upgrade (#69426) |
|
12 |
2457c72d61992596a1c3873192ea77b442d82230 |
.pre-commit-config.yaml | ||
---|---|---|
6 | 6 |
hooks: |
7 | 7 |
- id: pyupgrade |
8 | 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'] |
|
9 | 14 |
- repo: https://github.com/psf/black |
10 | 15 |
rev: 22.3.0 |
11 | 16 |
hooks: |
README | ||
---|---|---|
87 | 87 | |
88 | 88 |
pyupgrade --keep-percent-format --py37-plus |
89 | 89 | |
90 |
django-upgrade is used to automatically upgrade Django syntax, using those parameters: |
|
91 | ||
92 |
django-upgrade --target-version 2.2 |
|
93 | ||
90 | 94 |
There is .pre-commit-config.yaml to use pre-commit to automatically run black, |
91 |
isort and pyupgrade before commits. (execute `pre-commit install` to install
|
|
92 |
the git hook.) |
|
95 |
isort, pyupgrade, and django-upgrade before commits. (execute `pre-commit install`
|
|
96 |
to install the git hook.)
|
|
93 | 97 | |
94 | 98 |
Support |
95 | 99 |
======= |
96 |
- |