mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
Put all mypy_test.py version parsing in mypy_test.py (#14974)
This commit is contained in:
@@ -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
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user