From b7d72087d22a486354e2ac9ede6d954508d2034c Mon Sep 17 00:00:00 2001
From: Dorian Turba <froggit.commit.z3jqj@simplelogin.com>
Date: Fri, 6 Oct 2023 15:08:01 +0200
Subject: [PATCH] add mypy_run var to mypy template

---
 templates/python/code_quality/mypy/README.md | 11 ++++++-----
 templates/python/code_quality/mypy/mypy.yml  |  3 ++-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/templates/python/code_quality/mypy/README.md b/templates/python/code_quality/mypy/README.md
index 19e8769..51b56b0 100644
--- a/templates/python/code_quality/mypy/README.md
+++ b/templates/python/code_quality/mypy/README.md
@@ -16,11 +16,12 @@ types of variables, function return values, and more.
 
 ## Variables
 
-| Name                | Description                                                                                                                                                   | Default                              |
-|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------|
-| `PROJECT_PATH`      | The path to the project root directory.                                                                                                                       | `"."`                                |
-| `IMAGE_TAG`         | The default tag for the docker image. See [Python Docker Official Image](https://hub.docker.com/_/python) for supported tags and respective Dockerfile links. | `"latest"`                           |
-| `PYTHON_SETUP`      | Bash commands to setup your python environment.                                                                                                               | `"pip install mypy"`                 |
+| Name           | Description                                                                                                                                                   | Default                   |
+|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|
+| `PROJECT_PATH` | The path to the project root directory.                                                                                                                       | `"."`                     |
+| `IMAGE_TAG`    | The default tag for the docker image. See [Python Docker Official Image](https://hub.docker.com/_/python) for supported tags and respective Dockerfile links. | `"latest"`                |
+| `PYTHON_SETUP` | Bash commands to setup your python environment.                                                                                                               | `"pip install mypy"`      |
+| `MYPY_RUN`     | Bash commands to run `mypy` on your project.                                                                                                                  | `"mypy ${PROJECT_PATH}"`  |
 
 ## Global Configuration of mypy
 
diff --git a/templates/python/code_quality/mypy/mypy.yml b/templates/python/code_quality/mypy/mypy.yml
index 8249e87..2f8385c 100644
--- a/templates/python/code_quality/mypy/mypy.yml
+++ b/templates/python/code_quality/mypy/mypy.yml
@@ -7,9 +7,10 @@ mypy:
     stage: code_quality
     variables:
         PYTHON_SETUP: "pip install mypy"
+        MYPY_RUN: "mypy ${PROJECT_PATH}"
     script:
         - !reference [.python_install, script]
-        - mypy ${PROJECT_PATH}
+        - ${MYPY_RUN}
 
 
 
-- 
GitLab