summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Pope <nick@nickpope.me.uk>2022-03-03 15:33:55 +0000
committerCarlton Gibson <carlton@noumenal.es>2022-03-09 14:51:13 +0100
commitb1005c0e4029c23f4e718ce0a7afdfa926c095de (patch)
treedbe3a3de35752f572d3a9df5df3d834c2987b860
parentfa948980341b43e76140ac78dcff30bf0bd65369 (diff)
Refs #33476 -- Prevented formatting of .py-tpl files with black by pre-commit.
When using `pre-commit run --all-files`, files explicitly passed to black are processed even if they don't match the `include` configuration option. For some reason, (only) one of the `*.py-tpl` files is picked up by pre-commit. We can avoid this by explicitly excluding certain patterns of files for the black hook in the pre-commit configuration.
-rw-r--r--.pre-commit-config.yaml1
1 files changed, 1 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 3f6dc9ab4c..d75ae077bd 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,6 +3,7 @@ repos:
rev: 22.1.0
hooks:
- id: black
+ exclude: \.py-tpl$
- repo: https://github.com/PyCQA/isort
rev: 5.9.3
hooks: