Skip to content

Commit 33c2783

Browse files
committed
add a mypy pre-commit hook
1 parent 1600915 commit 33c2783

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ci:
77
- ruff-format
88
- verifytypes
99
- typetest
10+
- basedmypy
1011

1112
repos:
1213
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -62,3 +63,9 @@ repos:
6263
language: system
6364
always_run: true
6465
pass_filenames: false
66+
67+
- id: basedmypy
68+
name: basedmypy
69+
entry: poe mypy
70+
language: system
71+
types_or: [python, pyi]

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ cmd = "basedpyright scipy-stubs/$path"
6868
args = [{name = "path", positional = true, multiple = false, default = ""}]
6969

7070
[tool.poe.tasks.mypy]
71-
cmd = "mypy --config-file=pyproject.toml scipy-stubs/$path"
72-
args = [{name = "path", positional = true, multiple = false, default = ""}]
71+
cmd = "mypy --config-file=pyproject.toml $path"
72+
args = [{name = "path", positional = true, multiple = true, default = "scipy-stubs"}]
7373

7474
[tool.poe.tasks.stubtest]
7575
cmd = """

0 commit comments

Comments
 (0)