diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46db340b..ec228fec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,3 +32,7 @@ jobs: make check_code_quality - name: 🧪 Test run: "python -m unittest" + - name: Check types with mypy + run: mypy . + # TODO: Fix typing + continue-on-error: true diff --git a/pyproject.toml b/pyproject.toml index 3793f5ec..6f047913 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,3 +135,24 @@ convention = "google" [tool.ruff.pylint] max-args = 20 + +[tool.mypy] +exclude = [ + "^build/" +] + +[[tool.mypy.overrides]] +module = "_datetime.*" +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = "requests_toolbelt.*" +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = "ultralytics.*" +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = "ipywidgets.*" +ignore_missing_imports = true diff --git a/setup.py b/setup.py index d9d1e939..07818942 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,19 @@ # create optional [desktop] extras_require={ "desktop": ["opencv-python==4.8.0.74"], - "dev": ["flake8", "black==22.3.0", "isort", "responses", "twine", "wheel"], + "dev": [ + "flake8", + "black==22.3.0", + "isort", + "responses", + "twine", + "wheel", + "mypy", + "types-requests", + "types-pyyaml", + "types-setuptools", + "types-tqdm", + ], }, entry_points={ "console_scripts": [