Skip to content

Commit d6bd926

Browse files
committed
ci: fix regex in pre-commit config file
Problem: The `files` regex in `.pre-commit-config.yaml` has an extra slash in the pattern to detect python files under `t/`, so no files in that directory are being formatted. Update the pattern to find some Python files under `t/`, but not all. Since we don't necessarily want to lint and format every test python file in the testsuite, just include `t/scripts/*.py` and `t/python/*.py`.
1 parent f79be96 commit d6bd926

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
files: '^(src/bindings/python/flux|src/cmd|t/.*\\.py)'
2-
exclude: "^(src/bindings/python/_flux/|src/bindings/python/flux/utils/)"
1+
files: '^(src/bindings/python/flux|src/cmd|t/python/.*\.py|t/scripts/.*\.py)'
2+
exclude: "^(src/bindings/python/_flux/|src/bindings/python/flux/utils/|t/python/tap)"
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
55
rev: v4.0.1

0 commit comments

Comments
 (0)