misc: add django-upgrade files/notes (#69798)
This commit is contained in:
parent
5a6b5c5cd2
commit
cf7c18f812
|
@ -6,3 +6,5 @@ f014f154640dc30fd27662ec6d93ae6e64125ea3
|
||||||
a107b7ef0e847882dcd6d5fc8c39e8feccc5705e
|
a107b7ef0e847882dcd6d5fc8c39e8feccc5705e
|
||||||
# misc: apply djhtml (#69422)
|
# misc: apply djhtml (#69422)
|
||||||
a5ec15a465840c454ed1d94547be821523fed473
|
a5ec15a465840c454ed1d94547be821523fed473
|
||||||
|
# misc: apply django-upgrade (#69798)
|
||||||
|
5a6b5c5cd2efad36be91c39fc0cc9326cac7e6e6
|
||||||
|
|
|
@ -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:
|
||||||
|
|
4
README
4
README
|
@ -192,6 +192,10 @@ djhtml is used to automatically indent html files, using those parameters:
|
||||||
|
|
||||||
djhtml --tabwidth 2
|
djhtml --tabwidth 2
|
||||||
|
|
||||||
|
django-upgrade is used to automatically upgrade Django syntax, using those parameters:
|
||||||
|
|
||||||
|
django-upgrade --target-version 2.2
|
||||||
|
|
||||||
There is .pre-commit-config.yaml to use pre-commit to automatically run these tools
|
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.)
|
before commits. (execute `pre-commit install` to install the git hook.)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue