From 8d3fe38b92d1573603f26e067803a846d6c1109f Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Mon, 18 Nov 2024 11:13:39 +0100 Subject: [PATCH] Update `mypy` and run it on all the files Running `mypy` only on the changed files is the wrong thing to do, as typing changes in one file can have an effect on upstream code that imports said file. Apart from removing that file filtering, this also updates the `setup-python` GHA, and `mypy` itself. --- .github/workflows/mypy.yml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 17479c7..1d0a687 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -6,25 +6,16 @@ on: extra_config: type: string required: false - default: '' - description: 'Extra configuration for mypy' + default: "" + description: "Extra configuration for mypy" jobs: static-type-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v3 - with: - python-version: '3.12' - - run: pip install mypy==1.10.0 - - name: Get Python changed files - id: changed-py-files - uses: tj-actions/changed-files@v44.3.0 - with: - files: | - *.py - **/*.py - - name: Run if any of the listed files above is changed - if: steps.changed-py-files.outputs.any_changed == 'true' - run: mypy ${{ steps.changed-py-files.outputs.all_changed_files }} --ignore-missing-imports ${{ inputs.extra_config }} + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - run: pip install mypy==1.13.0 + - run: mypy . --ignore-missing-imports ${{ inputs.extra_config }}