From 2ce08764ccb92599926f653941e7c5e75c7b83ba Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Thu, 29 Sep 2022 11:50:30 +0200 Subject: [PATCH 2/2] 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 cca741b4..b24b4489 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -4,3 +4,5 @@ 29bc8e66a978b1bbadbc05186599a70ce1b8ef98 # misc: apply pyupgrade (#55868) f4615c506194cf4eace0af551f14f54552f09dc5 +# misc: apply djhtml (#69422) +c3948e1741a1ee4f42e964c75696bfb76da88be3 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 -- 2.35.1