diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index cca741b4..f4fb7d80 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -4,3 +4,5 @@ 29bc8e66a978b1bbadbc05186599a70ce1b8ef98 # misc: apply pyupgrade (#55868) f4615c506194cf4eace0af551f14f54552f09dc5 +# misc: apply djhtml (#69709) +4784a3990eec0aadadce99bf1da21c0b531b289d diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 793766a5..ef94dad9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,11 @@ 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'] - repo: https://git.entrouvert.org/pre-commit-debian.git rev: v0.1 hooks: diff --git a/README b/README index ea66da4f..62596b3a 100644 --- a/README +++ b/README @@ -104,9 +104,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.) License