Skip to content

Commit 57e2c13

Browse files
committed
make mypy_3.6: Still check the types in a Python 3.6 context, but using Py 3.7+
1 parent 6a312d4 commit 57e2c13

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/ci-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
py-ver-major: [3]
2626
py-ver-minor: [6, 7, 8, 9, 10]
2727
step: [lint, unit, bandit, mypy]
28+
exclude:
29+
- py-ver-major: 3
30+
py-ver-minor: 6
31+
step: mypy
2832

2933
env:
3034
py-semver: ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ mypy3: mypy
171171
mypy: $(filter-out setup.py,${PYSOURCES})
172172
MYPYPATH=$$MYPYPATH:mypy-stubs mypy $^
173173

174+
mypy_3.6: $(filter-out setup.py,${PYSOURCES})
175+
MYPYPATH=$$MYPYPATH:mypy-stubs mypy --python-version 3.6 $^
176+
174177
shellcheck: FORCE
175178
shellcheck release-test.sh
176179

tox.ini

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ envlist =
33
py{36,37,38,39,310}-lint,
44
py{36,37,38,39,310}-unit,
55
py{36,37,38,39,310}-bandit,
6-
py{36,37,38,39,310}-mypy,
6+
py{37,38,39,310}-mypy,
77
py310-lint-readme,
88
py310-pydocstyle
99

@@ -25,7 +25,7 @@ description =
2525
py{36,37,38,39,310}-unit: Run the unit tests
2626
py{36,37,38,39,310}-lint: Lint the Python code
2727
py{36,37,38,39,310}-bandit: Search for common security issues
28-
py{36,37,38,39,310}-mypy: Check for type safety
28+
py{37,38,39,310}-mypy: Check for type safety
2929
py310-pydocstyle: docstring style checker
3030
py310-lint-readme: Lint the README.rst->.md conversion
3131

@@ -49,7 +49,8 @@ commands =
4949
py{36,37,38,39,310}-bandit: bandit --recursive cwl_utils
5050
py{36,37,38,39,310}-lint: make flake8
5151
py{36,37,38,39,310}-lint: make format-check
52-
py{36,37,38,39,310}-mypy: make mypy
52+
py{37,38,39,310}-mypy: make mypy
53+
py37-mypy: make mypy_3.6
5354

5455
whitelist_externals =
5556
py{36,37,38,39,310}-lint: flake8

0 commit comments

Comments
 (0)