Skip to content

Commit 9b02562

Browse files
committed
Run mypy in GitHub CI
1 parent aefb9ce commit 9b02562

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ jobs:
4444
run: |
4545
python -m ruff format --check .
4646
47+
- name: Type Check
48+
run: |
49+
python -m mypy testtools
50+
4751
- name: Tests
4852
run: |
4953
python -W once -m testtools.run testtools.tests.test_suite

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Homepage = "https://github.com/testing-cabal/testtools"
3434
[project.optional-dependencies]
3535
test = ["testscenarios", "testresources"]
3636
twisted = ["Twisted", "fixtures"]
37-
dev = ["ruff==0.12.3"]
37+
dev = ["ruff==0.12.3", "mypy>=1.0.0"]
3838

3939
[tool.hatch.version]
4040
source = "vcs"

testtools/tests/twistedsupport/_helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
if TYPE_CHECKING:
1212
from types import ModuleType
13+
1314
defer: Optional[ModuleType]
1415
else:
1516
try:

0 commit comments

Comments
 (0)