Skip to content

Commit a08dfd2

Browse files
committed
Use ty instead of MyPy for type checking
1 parent 332aaf8 commit a08dfd2

File tree

3 files changed

+11
-21
lines changed

3 files changed

+11
-21
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
env:
2626
- lint
2727
- format
28-
- mypy
28+
- types
2929
- package
3030
- license
3131
steps:

pyproject.toml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,6 @@ exclude_also = ["if __name__ == .__main__.:"]
5858
show_missing = true
5959
skip_covered = true
6060

61-
[tool.mypy]
62-
exclude = [
63-
"tests/",
64-
"tests\\.py$",
65-
"test_.*\\.py$",
66-
".*_tests\\.py$",
67-
]
68-
ignore_missing_imports = true
69-
pretty = true
70-
warn_redundant_casts = true
71-
warn_unreachable = true
72-
warn_unused_ignores = true
73-
7461
[tool.pytest.ini_options]
7562
addopts = "--color=yes --doctest-modules --junitxml=tests/junit-report.xml --verbose"
7663

tox.ini

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
envlist =
99
lint
1010
format
11+
types
1112
license
12-
mypy
1313
py3{9,10,11,12,13,14}
1414
pypy3{9,10,11}
1515
package
@@ -59,12 +59,6 @@ skip_install = true
5959
deps = ruff
6060
commands = ruff check {posargs:.}
6161

62-
[testenv:mypy]
63-
description = Perform static type checking
64-
skip_install = true
65-
deps = mypy
66-
commands = mypy {posargs:.}
67-
6862
[testenv:package]
6963
description = Build package and check metadata (or upload package)
7064
skip_install = true
@@ -78,3 +72,12 @@ passenv =
7872
TWINE_USERNAME
7973
TWINE_PASSWORD
8074
TWINE_REPOSITORY_URL
75+
76+
[testenv:types]
77+
description = Perform static type checking
78+
skip_install = true
79+
deps =
80+
cli-test-helpers
81+
pytest
82+
ty
83+
commands = ty check {posargs}

0 commit comments

Comments
 (0)