From 042da4654aeafc1f4763c619b6ad8fe00cb0f1eb Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Thu, 17 Oct 2024 11:01:01 +0100 Subject: [PATCH] mypy-full_packages --- .github/workflows/python_checks.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python_checks.yml b/.github/workflows/python_checks.yml index f086163..ca18e58 100644 --- a/.github/workflows/python_checks.yml +++ b/.github/workflows/python_checks.yml @@ -93,9 +93,17 @@ on: required: false type: string default: "31" # Action fails on any message + mypy-full_packages: + description: > + The names of the Python packages to run full mypy on. + These are run in --disallow-untyped-defs mode + required: false + type: string mypy-packages: - description: The names of the Python packages to run flake8 on. - required: true + description: > + The names of Python packages to run simple mypy on. + These are run in without --disallow-untyped-defs + required: false type: string rat_config_file: description: > @@ -179,8 +187,11 @@ jobs: language: en_GB - name: Lint with mypy - if: ${{ inputs.mypy-packages != ''}} - run: mypy ${{ inputs.mypy-packages }} + run: mypy --python-version ${{ matrix.python-version }} ${{ inputs.mypy-packages }} + + - name: Lint with mypy using disallow-untyped-def + if: ${{ inputs.mypy-full-packages != ''}} + run: mypy --python-version ${{ matrix.python-version }} --disallow-untyped-defs ${{ inputs.mypy-full-packages }} - name: Test with pytest if: ${{ inputs.test_directories != ''}}