Skip to content

Commit

Permalink
Merge pull request #37 from codecov/swatinem/mypy-all-the-things
Browse files Browse the repository at this point in the history
Update `mypy` and run it on all the files
  • Loading branch information
Swatinem authored Nov 18, 2024
2 parents 0584651 + 8d3fe38 commit 92eeeab
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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 }}

0 comments on commit 92eeeab

Please sign in to comment.