Skip to content

Commit ca49afe

Browse files
committed
🧪 Run MyPy against both Python 3.8 and 3.13
1 parent 0f270f9 commit ca49afe

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

‎check.sh

+13-6
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,20 @@ echo "::group::Mypy"
5757
rm -f mypy_annotate.dat
5858
# Pipefail makes these pipelines fail if mypy does, even if mypy_annotate.py succeeds.
5959
set -o pipefail
60-
mypy --show-error-end --platform linux | python ./src/trio/_tools/mypy_annotate.py --dumpfile mypy_annotate.dat --platform Linux \
61-
|| { echo "* Mypy (Linux) found type errors." >> "$GITHUB_STEP_SUMMARY"; MYPY=1; }
60+
mypy --show-error-end --python-version=3.13 --platform linux | python ./src/trio/_tools/mypy_annotate.py --dumpfile mypy_annotate.dat --platform Linux \
61+
|| { echo "* Mypy (Linux, Python 3.13) found type errors." >> "$GITHUB_STEP_SUMMARY"; MYPY=1; }
6262
# Darwin tests FreeBSD too
63-
mypy --show-error-end --platform darwin | python ./src/trio/_tools/mypy_annotate.py --dumpfile mypy_annotate.dat --platform Mac \
64-
|| { echo "* Mypy (Mac) found type errors." >> "$GITHUB_STEP_SUMMARY"; MYPY=1; }
65-
mypy --show-error-end --platform win32 | python ./src/trio/_tools/mypy_annotate.py --dumpfile mypy_annotate.dat --platform Windows \
66-
|| { echo "* Mypy (Windows) found type errors." >> "$GITHUB_STEP_SUMMARY"; MYPY=1; }
63+
mypy --show-error-end --python-version=3.13 --platform darwin | python ./src/trio/_tools/mypy_annotate.py --dumpfile mypy_annotate.dat --platform Mac \
64+
|| { echo "* Mypy (Mac, Python 3.13) found type errors." >> "$GITHUB_STEP_SUMMARY"; MYPY=1; }
65+
mypy --show-error-end --python-version=3.13 --platform win32 | python ./src/trio/_tools/mypy_annotate.py --dumpfile mypy_annotate.dat --platform Windows \
66+
|| { echo "* Mypy (Windows, Python 3.13) found type errors." >> "$GITHUB_STEP_SUMMARY"; MYPY=1; }
67+
mypy --show-error-end --python-version=3.8 --platform linux | python ./src/trio/_tools/mypy_annotate.py --dumpfile mypy_annotate.dat --platform Linux \
68+
|| { echo "* Mypy (Linux, Python 3.8) found type errors." >> "$GITHUB_STEP_SUMMARY"; MYPY=1; }
69+
# Darwin tests FreeBSD too
70+
mypy --show-error-end --python-version=3.8 --platform darwin | python ./src/trio/_tools/mypy_annotate.py --dumpfile mypy_annotate.dat --platform Mac \
71+
|| { echo "* Mypy (Mac, Python 3.8) found type errors." >> "$GITHUB_STEP_SUMMARY"; MYPY=1; }
72+
mypy --show-error-end --python-version=3.8 --platform win32 | python ./src/trio/_tools/mypy_annotate.py --dumpfile mypy_annotate.dat --platform Windows \
73+
|| { echo "* Mypy (Windows, Python 3.8) found type errors." >> "$GITHUB_STEP_SUMMARY"; MYPY=1; }
6774
set +o pipefail
6875
# Re-display errors using Github's syntax, read out of mypy_annotate.dat
6976
python ./src/trio/_tools/mypy_annotate.py --dumpfile mypy_annotate.dat

0 commit comments

Comments
 (0)