From bcac8e39eaf279cdd62443e6e5c9b8610f05f9f6 Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Thu, 22 Sep 2022 10:11:31 +0200 Subject: [PATCH 2/2] misc: add djhtml files/notes (#69419) --- .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 db05ca011..1599a92ab 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -10,3 +10,5 @@ a11be8fa590ad3d02a903dacb8393336b989a1a6 ff0d3779c024ba3a0109b91d9337aadd06b06788 # misc: apply black 22.1.0 877155f01d014e8fc778014c55e6a693247261f7 +# misc: apply djhtml (#69419) +05d6c52738b57fe521f2ce28173f3386bc32b767 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 73825dc99..189569af3 100644 --- a/README +++ b/README @@ -47,9 +47,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.) Copyright -- 2.30.2