Skip to content

Commit 6b5c117

Browse files
Merge pull request #2290 from VWS-Python/entry-path
Specify Python module use in pre-commit hooks
2 parents 0bc7be8 + f4d461d commit 6b5c117

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.pre-commit-config.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
hooks:
2929
- id: custom-linters
3030
name: custom-linters
31-
entry: pytest ci/custom_linters.py
31+
entry: python -m pytest ci/custom_linters.py
3232
stages: [push]
3333
language: system
3434
types_or: [yaml, python]
@@ -44,56 +44,56 @@ repos:
4444
- id: mypy
4545
name: mypy
4646
stages: [push]
47-
entry: mypy .
47+
entry: python -m mypy .
4848
language: system
4949
types_or: [python, toml]
5050
pass_filenames: false
5151

5252
- id: check-manifest
5353
name: check-manifest
5454
stages: [push]
55-
entry: check-manifest .
55+
entry: python -m check_manifest .
5656
language: system
5757
pass_filenames: false
5858

5959
- id: pyright
6060
name: pyright
6161
stages: [push]
62-
entry: pyright .
62+
entry: python -m pyright .
6363
language: system
6464
types_or: [python, toml]
6565
pass_filenames: false
6666

6767
- id: pyright-verifytypes
6868
name: pyright-verifytypes
6969
stages: [push]
70-
entry: pyright --verifytypes mock_vws
70+
entry: python -m pyright --verifytypes mock_vws
7171
language: system
7272
pass_filenames: false
7373
types_or: [python]
7474

7575
- id: vulture
7676
name: vulture
77-
entry: vulture --min-confidence 100 --exclude .eggs
77+
entry: python -m vulture --min-confidence 100 --exclude .eggs
7878
language: system
7979
types_or: [python]
8080

8181
- id: pyroma
8282
name: pyroma
83-
entry: pyroma --min 10 .
83+
entry: python -m pyroma --min 10 .
8484
language: system
8585
pass_filenames: false
8686
types_or: [toml]
8787

8888
- id: deptry
8989
name: deptry
90-
entry: deptry src/
90+
entry: python -m deptry src/
9191
language: system
9292
pass_filenames: false
9393

9494
- id: pylint
9595
name: pylint
96-
entry: pylint *.py src/ tests/ docs/ ci/
96+
entry: python -m pylint *.py src/ tests/ docs/ ci/
9797
language: system
9898
stages: [manual]
9999
pass_filenames: false
@@ -111,37 +111,37 @@ repos:
111111

112112
- id: ruff-check
113113
name: Ruff check
114-
entry: ruff check
114+
entry: python -m ruff check
115115
language: system
116116
types_or: [python]
117117

118118
- id: ruff-format-diff
119119
name: Ruff format diff
120-
entry: ruff format --diff
120+
entry: python -m ruff format --diff
121121
language: system
122122
types_or: [python]
123123

124124
- id: ruff-check-fix
125125
name: Ruff check fix
126-
entry: ruff check --fix
126+
entry: python -m ruff check --fix
127127
language: system
128128
types_or: [python]
129129

130130
- id: ruff-format-fix
131131
name: Ruff format
132-
entry: ruff format
132+
entry: python -m ruff format
133133
language: system
134134
types_or: [python]
135135

136136
- id: doc8
137137
name: doc8
138-
entry: doc8
138+
entry: python -m doc8
139139
language: system
140140
types_or: [rst]
141141

142142
- id: interrogate
143143
name: interrogate
144-
entry: interrogate src/ tests/ ci/
144+
entry: python -m interrogate src/ tests/ ci/
145145
language: system
146146
types_or: [python]
147147
exclude_types: [executable]

0 commit comments

Comments
 (0)