Skip to content

Commit c93342c

Browse files
committed
Setup mypy
1 parent a9f43fd commit c93342c

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ jobs:
3232
make check_code_quality
3333
- name: 🧪 Test
3434
run: "python -m unittest"
35+
- name: Check types with mypy
36+
run: mypy .
37+
# TODO: Fix typing
38+
continue-on-error: true

pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,16 @@ convention = "google"
135135

136136
[tool.ruff.pylint]
137137
max-args = 20
138+
139+
[tool.mypy]
140+
exclude = [
141+
"^build/"
142+
]
143+
144+
[[tool.mypy.overrides]]
145+
module = "requests_toolbelt.*"
146+
ignore_missing_imports = true
147+
148+
[[tool.mypy.overrides]]
149+
module = "ultralytics.*"
150+
ignore_missing_imports = true

setup.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,19 @@
2828
# create optional [desktop]
2929
extras_require={
3030
"desktop": ["opencv-python==4.8.0.74"],
31-
"dev": ["flake8", "black==22.3.0", "isort", "responses", "twine", "wheel"],
31+
"dev": [
32+
"flake8",
33+
"black==22.3.0",
34+
"isort",
35+
"responses",
36+
"twine",
37+
"wheel",
38+
"mypy",
39+
"types-requests",
40+
"types-pyyaml",
41+
"types-setuptools",
42+
"types-tqdm",
43+
],
3244
},
3345
entry_points={
3446
"console_scripts": [

0 commit comments

Comments
 (0)