From 1f6c4c34f710bff4bd64285e8ebda9bea5fcd421 Mon Sep 17 00:00:00 2001 From: Esa Jokinen Date: Wed, 31 Jul 2024 01:05:06 +0300 Subject: [PATCH] Add Mypy workflow --- .github/workflows/python.yml | 13 ++++++++++++- README.md | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 263d346..41a8c01 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,4 +1,4 @@ -name: Black (Python) +name: Python Code Quality on: push: pull_request: @@ -16,3 +16,14 @@ jobs: with: options: --check --verbose src: . + mypy: + name: Mypy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Strict static type checking for Python scripts + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - run: pip install mypy + - run: mypy --strict */*.py diff --git a/README.md b/README.md index 2fe76ef..fc78840 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Miscellaneous scripts for different purposes. Mostly unrelated to each other. ![ShellCheck](https://github.com/oh2fih/Misc-Scripts/workflows/ShellCheck/badge.svg) -![Black (Python)](https://github.com/oh2fih/Misc-Scripts/workflows/Black%20(Python)/badge.svg) +![Python Code Quality)](https://github.com/oh2fih/Misc-Scripts/workflows/Python%20Code%20Quality/badge.svg) | Category | Script & Language | Purpose & Usage | |:---|:---|:---|