From b4d391ad2fe6ae2bc68c177e81d5ae4f3db0e09f Mon Sep 17 00:00:00 2001 From: Dorian Turba <froggit.commit.z3jqj@simplelogin.com> Date: Wed, 19 Jul 2023 09:57:14 +0200 Subject: [PATCH] fix mypy template testing --- .gitlab-ci.yml | 22 +++++++++---------- tests/mypy_project/pyproject.toml | 11 ++++++++++ .../mypy_project/src/mypy_project/__init__.py | 3 +++ tests/mypy_project/src/mypy_project/main.py | 11 ++++++++++ 4 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 tests/mypy_project/pyproject.toml create mode 100644 tests/mypy_project/src/mypy_project/__init__.py create mode 100644 tests/mypy_project/src/mypy_project/main.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95664b1..59c495f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,17 +30,17 @@ flake8: - templates/python/code_quality/flake8/**/* - tests/flake8_project/**/* -flake8-pluggin: - stage: templates - variables: - PROJECT_PATH: "tests/flake8_project" - PYTHON_SETUP: "pip install flake8 flake8-bugbear" - only: - changes: - - .gitlab-ci.yml - - pyproject.toml - - templates/python/code_quality/flake8/**/* - - tests/flake8_project/**/* +#flake8-plugin: +# stage: templates +# variables: +# PROJECT_PATH: "tests/flake8_project" +# PYTHON_SETUP: "pip install flake8 flake8-bugbear" +# only: +# changes: +# - .gitlab-ci.yml +# - pyproject.toml +# - templates/python/code_quality/flake8/**/* +# - tests/flake8_project/**/* black: stage: templates diff --git a/tests/mypy_project/pyproject.toml b/tests/mypy_project/pyproject.toml new file mode 100644 index 0000000..f422a3d --- /dev/null +++ b/tests/mypy_project/pyproject.toml @@ -0,0 +1,11 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "mypy_project" +version = "0.1.0" +authors = [ + { name = "Author Name", email = "author.name@example.com" }, +] +description = "A description of what the package is for." diff --git a/tests/mypy_project/src/mypy_project/__init__.py b/tests/mypy_project/src/mypy_project/__init__.py new file mode 100644 index 0000000..d344850 --- /dev/null +++ b/tests/mypy_project/src/mypy_project/__init__.py @@ -0,0 +1,3 @@ +from mypy_project.main import main + +__all__ = ["main"] diff --git a/tests/mypy_project/src/mypy_project/main.py b/tests/mypy_project/src/mypy_project/main.py new file mode 100644 index 0000000..250de77 --- /dev/null +++ b/tests/mypy_project/src/mypy_project/main.py @@ -0,0 +1,11 @@ +"""Sample main module.""" + + +def main() -> bool: + """Sample main function.""" + print("Hello, world!") + return True + + +if __name__ == "__main__": + main() -- GitLab