Put all mypy_test.py version parsing in mypy_test.py (#14974)

This commit is contained in:
Alex Waygood
2025-11-03 15:30:38 -05:00
committed by GitHub
parent 37dceef034
commit eca15d9654
2 changed files with 2 additions and 6 deletions
+1 -5
View File
@@ -62,11 +62,7 @@ jobs:
sudo apt-get update -q && sudo apt-get install -qy $PACKAGES
fi
- name: Run mypy_test.py
run: |
# python-version can sometimes be pinned to a specific version or to "-dev", but
# mypy understands only X.Y version numbers.
MYPY_PY_VERSION=$(echo ${{ matrix.python-version }} | cut -d - -f 1 | cut -d . -f 1-2)
python ./tests/mypy_test.py --platform=${{ matrix.platform }} --python-version=${MYPY_PY_VERSION}
run: python ./tests/mypy_test.py --platform=${{ matrix.platform }} --python-version=${{ matrix.python-version }}
regression-tests:
name: "mypy: Run test cases"
+1 -1
View File
@@ -78,7 +78,7 @@ def remove_dev_suffix(version: str) -> str:
"""
if version.endswith("-dev"):
return version[: -len("-dev")]
return version
return ".".join(version.split(".")[:2])
parser = argparse.ArgumentParser(