misc: add djhtml files/notes (#69422)

This commit is contained in:
Valentin Deniaud 2022-09-29 12:19:03 +02:00
parent d20066dc44
commit bd45e64b48
3 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,5 @@
5b9bc1ff57cfb47458d629c15bcae28ae0bc141b
# apply isort and pyupgrade
4729ef9a3bdf2f09541469802d0e7cc3b6a48405
# misc: apply djhtml (#69422)
d20066dc440cbffc765978f222bd97958753978e

View File

@ -16,3 +16,8 @@ repos:
hooks:
- id: pyupgrade
args: ['--keep-percent-format', '--py37-plus']
- repo: https://github.com/rtts/djhtml
rev: 'v1.5.2'
hooks:
- id: djhtml
args: ['--tabwidth', '2']

8
README
View File

@ -343,9 +343,13 @@ pyupgrade is used to automatically upgrade syntax, using those parameters:
pyupgrade --keep-percent-format --py37-plus
djhtml is used to automatically indent html files, using those parameters:
django-upgrade --tabwidth 2
There is .pre-commit-config.yaml to use pre-commit to automatically run black,
isort and pyupgrade before commits. (execute `pre-commit install` to install
the git hook.)
isort, pyupgrade, and djhtml before commits. (execute `pre-commit install`
to install the git hook.)
Remarks
=======