Skip to content

Commit 6a16460

Browse files
authored
Merge pull request #3 from kraken-tech/project.set-up-mypy
Set up MyPy for CI
2 parents 5ff89c4 + 5186a61 commit 6a16460

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

pyproject.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,35 @@ include-package-data = true
5050
test = [
5151
"pytest",
5252
]
53+
mypy = [
54+
"mypy",
55+
{include-group = "test"},
56+
]
57+
58+
59+
# Mypy
60+
# ====
61+
62+
[tool.mypy]
63+
files = "."
64+
exclude = [
65+
"build/",
66+
"docs/",
67+
"venv",
68+
]
69+
70+
pretty = true
71+
show_error_codes = true
72+
73+
enable_error_code = [ # pragma: alphabetize
74+
"ignore-without-code",
75+
"possibly-undefined",
76+
"truthy-bool",
77+
"truthy-iterable",
78+
]
79+
strict = false
80+
ignore_missing_imports = true
81+
no_implicit_optional = true
82+
strict_equality = true
83+
warn_unreachable = true
84+
warn_no_return = true

tox.ini

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py3{9,10,11,12,13,14}
2+
envlist = py3{9,10,11,12,13,14},mypy
33

44
[testenv]
55
# Install wheels instead of source distributions for faster execution.
@@ -9,3 +9,9 @@ wheel_build_env = .pkg
99

1010
dependency_groups = test
1111
commands = python -m pytest {posargs:tests}
12+
13+
[testenv:mypy]
14+
dependency_groups = mypy
15+
setenv =
16+
TERM=xterm-color
17+
commands = mypy {posargs:.}

0 commit comments

Comments
 (0)