From ea2222762585180e5b808844a91a765ce01ca70f Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Sat, 24 May 2025 17:10:13 +0300 Subject: [PATCH] Add mypy configuration Signed-off-by: Povilas Kanapickas --- pyproject.toml | 18 ++++++++++++++++++ test-requirements.txt | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 282edfb..b46cac5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,3 +53,21 @@ quote-style = "preserve" directory = "misc" name = "Misc" showcontent = true + +[tool.mypy] +python_version = "3.9" +namespace_packages = true +explicit_package_bases = true +pretty = true +warn_redundant_casts = true +disallow_untyped_calls = false +disallow_untyped_defs = true +no_implicit_optional = true +mypy_path = "$MYPY_CONFIG_FILE_DIR" +exclude = "build" + +[[tool.mypy.overrides]] +module = [ + "parameterized.*", +] +ignore_missing_imports = true diff --git a/test-requirements.txt b/test-requirements.txt index e53f1d0..73927a0 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,8 +4,12 @@ cryptography==44.0.3 parameterized==0.9.0 pytest==8.0.2 tox==4.13.0 +mypy==1.15.0 ruff==0.3.1 pylint==3.1.0 +types-PyYAML==6.0.12.20250402 +types-requests==2.32.0.20250328 +types-setuptools==80.7.0.20250516 # The packages below are transitive dependencies of the packages above and are included here # to make testing reproducible. @@ -24,6 +28,7 @@ filelock==3.13.1 iniconfig==2.0.0 isort==5.13.2 mccabe==0.7.0 +mypy_extensions==1.1.0 packaging==23.2 platformdirs==4.2.0 pluggy==1.4.0 @@ -32,4 +37,5 @@ python-dotenv==1.0.1 PyYAML==6.0.1 requests tomlkit==0.12.4 +typing_extensions==4.13.2 virtualenv==20.26.6