Skip to content

Commit cc697a6

Browse files
committed
pre-commit: anchor exclude patterns
1 parent bf3f720 commit cc697a6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.pre-commit-config.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repos:
1919
args: [-f, gcc]
2020
types: [text]
2121
files: ^(bash_completion|completions/.+|test/(config/bashrc|update-test-cmd-list)|.+\.sh(\.in)?)$
22-
exclude: completions/(\.gitignore|Makefile.*)$
22+
exclude: ^completions/(\.gitignore|Makefile.*)$
2323
require_serial: false # We disable SC1090 anyway, so parallel is ok
2424

2525
- repo: local
@@ -37,7 +37,7 @@ repos:
3737
- id: black
3838
types: [text]
3939
files: ^(helpers/python|.+\.py)$
40-
exclude: completions/
40+
exclude: ^completions/
4141

4242
- repo: https://gitlab.com/pycqa/flake8
4343
rev: 3.8.3
@@ -47,7 +47,7 @@ repos:
4747
additional_dependencies: [flake8-bugbear==20.1.4]
4848
types: [text]
4949
files: ^(helpers/python|.+\.py)$
50-
exclude: completions/
50+
exclude: ^completions/
5151

5252
- repo: https://github.com/timothycrosley/isort
5353
rev: 5.1.4
@@ -56,22 +56,22 @@ repos:
5656
args: [--settings-path=test/setup.cfg]
5757
types: [text]
5858
files: ^(helpers/python|.+\.py)$
59-
exclude: completions/
59+
exclude: ^completions/
6060

6161
- repo: https://github.com/pre-commit/mirrors-mypy
6262
rev: v0.782
6363
hooks:
6464
- id: mypy
6565
args: [--config-file=test/setup.cfg]
6666
# Intentionally not run on helpers/python (support very old versions)
67-
exclude: completions/|test/fixtures/pytest/
67+
exclude: ^completions/|^test/fixtures/pytest/
6868

6969
- repo: https://github.com/asottile/pyupgrade
7070
rev: v2.7.2
7171
hooks:
7272
- id: pyupgrade
7373
args: [--py3-plus, --keep-percent-format]
74-
exclude: completions/
74+
exclude: ^completions/
7575

7676
- repo: https://github.com/perltidy/perltidy
7777
rev: "20200619"

0 commit comments

Comments
 (0)