Skip to content

Commit 23e5f86

Browse files
committed
mypy: Start checking tests
We were only passing testtools to mypy, which meant tests were never getting run through mypy. Fixing this highlights a large number of issues that must be resolved. Signed-off-by: Stephen Finucane <stephen@that.guru>
1 parent 8bd225c commit 23e5f86

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
3333
- name: Ruff
3434
run: |
35-
python -m ruff check .
36-
python -m ruff format --check .
35+
python -m ruff check
36+
python -m ruff format --check
3737
3838
- name: Type Check
3939
run: |
40-
python -m mypy testtools
40+
python -m mypy
4141
4242
test:
4343
runs-on: ubuntu-latest

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ warn_unused_ignores = false
6969
# FIXME(stephenfin): We should remove this
7070
implicit_reexport = true
7171
exclude = 'doc'
72+
files = [
73+
"testtools",
74+
"tests",
75+
]
7276

7377
[[tool.mypy.overrides]]
7478
module = [

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ commands =
1414
deps =
1515
ruff
1616
commands =
17-
ruff check --fix .
18-
ruff format .
17+
ruff check --fix
18+
ruff format
1919

2020
[testenv:mypy]
2121
deps =
2222
mypy
2323
commands =
24-
mypy --cache-dir="{envdir}/mypy_cache" {posargs:testtools}
24+
mypy --cache-dir="{envdir}/mypy_cache" {posargs}

0 commit comments

Comments
 (0)