misc: add django-upgrade files/notes (#69426)
This commit is contained in:
parent
0bec12d61d
commit
3c97499ba6
|
@ -10,3 +10,5 @@ a265c6267e75c831b8294a760f94b9d6cffb92ea
|
||||||
09c2a08d113b2194697fc0a3925d569184babe97
|
09c2a08d113b2194697fc0a3925d569184babe97
|
||||||
# misc: apply djhtml (#69422)
|
# misc: apply djhtml (#69422)
|
||||||
8251b8188fb57414214ace63459156b43ddda46d
|
8251b8188fb57414214ace63459156b43ddda46d
|
||||||
|
# misc: apply django-upgrade (#69426)
|
||||||
|
0bec12d61de2de7f812f5055de2724942beeedb5
|
||||||
|
|
|
@ -6,6 +6,11 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: ['--keep-percent-format', '--py37-plus']
|
args: ['--keep-percent-format', '--py37-plus']
|
||||||
|
- repo: https://github.com/adamchainz/django-upgrade
|
||||||
|
rev: 1.10.0
|
||||||
|
hooks:
|
||||||
|
- id: django-upgrade
|
||||||
|
args: ['--target-version', '2.2']
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.3.0
|
rev: 22.3.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
9
README
9
README
|
@ -91,9 +91,12 @@ djhtml is used to automatically indent html files, using those parameters:
|
||||||
|
|
||||||
djhtml --tabwidth 2
|
djhtml --tabwidth 2
|
||||||
|
|
||||||
There is .pre-commit-config.yaml to use pre-commit to automatically run black,
|
django-upgrade is used to automatically upgrade Django syntax, using those parameters:
|
||||||
isort, pyupgrade, and djhtml before commits. (execute `pre-commit install`
|
|
||||||
to install the git hook.)
|
django-upgrade --target-version 2.2
|
||||||
|
|
||||||
|
There is .pre-commit-config.yaml to use pre-commit to automatically run these tools
|
||||||
|
before commits. (execute `pre-commit install` to install the git hook.)
|
||||||
|
|
||||||
Support
|
Support
|
||||||
=======
|
=======
|
||||||
|
|
Loading…
Reference in New Issue