misc: add django-upgrade files/notes (#69809)
This commit is contained in:
parent
77ad58bf8f
commit
7ba5ff18f5
|
@ -12,3 +12,5 @@ ff0d3779c024ba3a0109b91d9337aadd06b06788
|
|||
877155f01d014e8fc778014c55e6a693247261f7
|
||||
# misc: apply djhtml (#69419)
|
||||
dfdbaf2b8ab7202643701eb87edbdee1b1a137e4
|
||||
# misc: apply django-upgrade (#69799)
|
||||
77ad58bf8f16303d19d9f16352bb6ff8ca6d0e98
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.20.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
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
|
||||
rev: 22.3.0
|
||||
hooks:
|
||||
|
@ -11,11 +21,6 @@ repos:
|
|||
hooks:
|
||||
- id: isort
|
||||
args: ['--profile', 'black', '--line-length', '110']
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.20.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: ['--keep-percent-format', '--py37-plus']
|
||||
- repo: https://github.com/rtts/djhtml
|
||||
rev: 'v1.5.2'
|
||||
hooks:
|
||||
|
|
9
README
9
README
|
@ -51,9 +51,12 @@ djhtml is used to automatically indent html files, using those parameters:
|
|||
|
||||
djhtml --tabwidth 2
|
||||
|
||||
There is .pre-commit-config.yaml to use pre-commit to automatically run black,
|
||||
isort, pyupgrade, and djhtml before commits. (execute `pre-commit install`
|
||||
to install the git hook.)
|
||||
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
|
||||
before commits. (execute `pre-commit install` to install the git hook.)
|
||||
|
||||
|
||||
Copyright
|
||||
|
|
Loading…
Reference in New Issue