From 95df011079d5fda94235fb582d228ac1fc75a9fe Mon Sep 17 00:00:00 2001 From: Dorian Turba <froggit.commit.z3jqj@simplelogin.com> Date: Wed, 19 Jul 2023 10:02:47 +0200 Subject: [PATCH] fix mypy template --- pyproject.toml | 1 + templates/python/code_quality/mypy/mypy.yml | 2 +- tests/mypy_project/pyproject.toml | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c74ab34..de310a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,4 +17,5 @@ dependencies = [ "flake8_project @ {root:uri}/tests/flake8_project", "isort_project @ {root:uri}/tests/isort_project", "pytest_project @ {root:uri}/tests/pytest_project", + "mypy_project @ {root:uri}/tests/mypy_project", ] diff --git a/templates/python/code_quality/mypy/mypy.yml b/templates/python/code_quality/mypy/mypy.yml index 5922d95..63eeb52 100644 --- a/templates/python/code_quality/mypy/mypy.yml +++ b/templates/python/code_quality/mypy/mypy.yml @@ -6,7 +6,7 @@ mypy: - python -m venv venv --upgrade-deps || python -m venv venv # upgrade-deps is not supported before 3.9 - source venv/bin/activate - pip install mypy - - mypy + - mypy ${PROJECT_PATH} only: changes: - ./**/*.py diff --git a/tests/mypy_project/pyproject.toml b/tests/mypy_project/pyproject.toml index f422a3d..51d87c0 100644 --- a/tests/mypy_project/pyproject.toml +++ b/tests/mypy_project/pyproject.toml @@ -9,3 +9,11 @@ authors = [ { name = "Author Name", email = "author.name@example.com" }, ] description = "A description of what the package is for." +dependencies = [ + "mypy", +] + + +[tool.mypy] +packages = "mypy_project" +python_version = "3.11" -- GitLab