Merge pull request #1780 from EDCD/enhancement/github/mypy-checks

mypy: Add script to run against all, and use in github/push-checks
This commit is contained in:
Athanasius authored and GitHub committed 2022-12-23 15:34:44 +00:00
commit f6c6281ac2
2 files changed
+17 -2

No files matched your search

+11 -2
View File
@@ -9,10 +9,15 @@ name: Push-Checks
on:
push:
branches: [ develop ]
# We'll catch issues on `develop` or any PR branch.
branches-ignore:
- 'main'
- 'stable'
- 'releases'
- 'beta'
jobs:
build:
push_checks:
runs-on: ubuntu-22.04
@@ -59,3 +64,7 @@ jobs:
grep -E -z -Z '\.py$' | \
xargs -0 flake8 --count --statistics --extend-ignore D
#######################################################################
- name: mypy type checks
run: |
./scripts/mypy-all.sh --platform win32
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
#
# Run mypy checks against all the relevant files
# We assume that all `.py` files in git should be checked, and *only* those.
mypy $@ $(git ls-tree --full-tree -r --name-only HEAD | grep -E '\.py$')