From adfe3fa0b9b8f5284fe1f11c98ebdee67d525af1 Mon Sep 17 00:00:00 2001 From: Silke Hofstra Date: Sat, 7 Oct 2023 17:08:17 +0200 Subject: [PATCH] ci: Add mypy linting for CI scripts --- .github/workflows/script_lint.yml | 8 +++++++- .gitignore | 3 +++ .mypy.ini | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .mypy.ini diff --git a/.github/workflows/script_lint.yml b/.github/workflows/script_lint.yml index fe1233f4d8..f592338349 100644 --- a/.github/workflows/script_lint.yml +++ b/.github/workflows/script_lint.yml @@ -21,4 +21,10 @@ jobs: - name: flake8 Lint uses: py-actions/flake8@v2 with: - path: "common/CI" + path: common/CI + - name: mypy lint + uses: jpetrucciani/mypy-check@master + with: + path: common/CI + python_version: "3.10" + requirements: types-PyYAML diff --git a/.gitignore b/.gitignore index 7358759546..79b2938d96 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ common/Go/yabi/yabi common/Go/ypkg/ypkg-tools common/switch_repo_domains + +# Python caches +.mypy_cache diff --git a/.mypy.ini b/.mypy.ini new file mode 100644 index 0000000000..b1efbe84ae --- /dev/null +++ b/.mypy.ini @@ -0,0 +1,2 @@ +[mypy] +strict = True