1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-18 18:07:37 +03:00

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 2022-12-23 15:34:44 +00:00 committed by GitHub
commit f6c6281ac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 2 deletions

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
scripts/mypy-all.sh Executable file
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$')