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.
This commit is contained in:
Nick Pope 2022-03-03 15:33:55 +00:00 committed by Carlton Gibson
parent fa94898034
commit b1005c0e40
1 changed files with 1 additions and 0 deletions

View File

@ -3,6 +3,7 @@ repos:
rev: 22.1.0 rev: 22.1.0
hooks: hooks:
- id: black - id: black
exclude: \.py-tpl$
- repo: https://github.com/PyCQA/isort - repo: https://github.com/PyCQA/isort
rev: 5.9.3 rev: 5.9.3
hooks: hooks: