From bd45e64b48ce41dc113504ed310a528462389361 Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Thu, 29 Sep 2022 12:19:03 +0200 Subject: [PATCH] misc: add djhtml files/notes (#69422) --- .git-blame-ignore-revs | 2 ++ .pre-commit-config.yaml | 5 +++++ README | 8 ++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index b02c6ce..f31b495 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,3 +1,5 @@ 5b9bc1ff57cfb47458d629c15bcae28ae0bc141b # apply isort and pyupgrade 4729ef9a3bdf2f09541469802d0e7cc3b6a48405 +# misc: apply djhtml (#69422) +d20066dc440cbffc765978f222bd97958753978e diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e7f73b..cee2293 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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'] diff --git a/README b/README index a1206c3..8399b1e 100644 --- a/README +++ b/README @@ -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 =======