From 72f53aea61e1dce13404aea84f928df3ff960635 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 18 Oct 2024 07:01:07 +0100 Subject: [PATCH] make sure full mypy run in all python versions --- .github/workflows/python_checks.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python_checks.yml b/.github/workflows/python_checks.yml index ca18e58..3db2c38 100644 --- a/.github/workflows/python_checks.yml +++ b/.github/workflows/python_checks.yml @@ -99,12 +99,14 @@ on: These are run in --disallow-untyped-defs mode required: false type: string + default: '' mypy-packages: description: > The names of Python packages to run simple mypy on. These are run in without --disallow-untyped-defs required: false type: string + default: '' rat_config_file: description: > Which xml config file to use for rat. @@ -187,6 +189,7 @@ jobs: language: en_GB - name: Lint with mypy + if: ${{ inputs.mypy-packages != ''}} run: mypy --python-version ${{ matrix.python-version }} ${{ inputs.mypy-packages }} - name: Lint with mypy using disallow-untyped-def @@ -259,7 +262,11 @@ jobs: - name: Lint with mypy if: ${{ (matrix.python-version != env.PRERELEASE || inputs.check_prereleases == 'true') && 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: ${{ (matrix.python-version != env.PRERELEASE || inputs.check_prereleases == 'true') && inputs.mypy-full-packages != '' }} + run: mypy --python-version ${{ matrix.python-version }} --disallow-untyped-defs ${{ inputs.mypy-full-packages }} - name: Test with pytest if: ${{ (matrix.python-version != env.PRERELEASE || inputs.check_prereleases == 'true') && inputs.test_directories != ''}}