From b1005c0e4029c23f4e718ce0a7afdfa926c095de Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Thu, 3 Mar 2022 15:33:55 +0000 Subject: [PATCH] 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. --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) 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: