Skip to content

Commit b1005c0

Browse files
ngnpopecarltongibson
authored andcommitted
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.
1 parent fa94898 commit b1005c0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ repos:
33
rev: 22.1.0
44
hooks:
55
- id: black
6+
exclude: \.py-tpl$
67
- repo: https://github.com/PyCQA/isort
78
rev: 5.9.3
89
hooks:

0 commit comments

Comments
 (0)