diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index c73b13f80..725cb56e7 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -8,3 +8,5 @@ a265c6267e75c831b8294a760f94b9d6cffb92ea 7bc0fcadffd16564cc200cb2f32fae80b3c3a5cf # misc: apply black 22.1.0 09c2a08d113b2194697fc0a3925d569184babe97 +# misc: apply djhtml (#69422) +8251b8188fb57414214ace63459156b43ddda46d diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 793766a50..ef94dad99 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 f33743a03..73d38b90d 100644 --- a/README +++ b/README @@ -87,9 +87,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.) Support =======