Skip to content

Commit c968dae

Browse files
committed
Use mypy for static typing job
I prefer pytype's approach, but pytype doesn't support Python 3.8 or 3.9 yet, which is unnecessarily restrictive. ☹
1 parent 9e7e4f5 commit c968dae

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: "ubuntu-latest"
3232
strategy:
3333
matrix:
34-
toxenv: ["build", "precommit", "pytype", "docs"]
34+
toxenv: ["build", "precommit", "typing", "docs"]
3535
env:
3636
TOXENV: ${{ matrix.toxenv }}
3737

bump_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import io
33
import pathlib
44

5-
import parver
5+
import parver # type: ignore
66

77
REPO_ROOT = pathlib.Path(__file__).parent
88
VERSION = REPO_ROOT / pathlib.Path("VERSION")

tox.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,15 @@ deps =
3838
commands =
3939
python bump_version.py {posargs}
4040

41-
[testenv:pytype]
41+
[testenv:typing]
4242
description = Run typechecking
43-
basepython = python3.7
4443
skip_install = True
4544
deps =
46-
pytype
45+
mypy
4746
parver
4847
commands =
49-
pytype {posargs} update.py
50-
pytype {posargs} bump_version.py
48+
mypy {posargs} update.py
49+
mypy {posargs} bump_version.py
5150

5251
[testenv:format]
5352
description = Run auto formatters

0 commit comments

Comments
 (0)