Unverified Commit e036e527 authored by Russell Bryant's avatar Russell Bryant Committed by GitHub
Browse files

[CI/Build] Improve mypy + python version matrix (#10041)


Signed-off-by: default avatarRussell Bryant <rbryant@redhat.com>
parent 6192e9b8
......@@ -43,4 +43,4 @@ jobs:
- name: Mypy
run: |
echo "::add-matcher::.github/workflows/matchers/mypy.json"
tools/mypy.sh 1
tools/mypy.sh 1 ${{ matrix.python-version }}
......@@ -55,14 +55,12 @@ ignore = [
]
[tool.mypy]
python_version = "3.9"
ignore_missing_imports = true
check_untyped_defs = true
follow_imports = "silent"
# After fixing type errors resulting from follow_imports: "skip" -> "silent",
# move the directory here and remove it from format.sh and mypy.yaml
# move the directory here and remove it from tools/mypy.sh
files = [
"vllm/*.py",
"vllm/adapter_commons",
......
#!/bin/bash
CI=${1:-0}
PYTHON_VERSION=${2:-3.9}
if [ $CI -eq 1 ]; then
set -e
......@@ -9,10 +10,10 @@ fi
run_mypy() {
echo "Running mypy on $1"
if [ $CI -eq 1 ] && [ -z "$1" ]; then
mypy "$@"
mypy --python-version "${PYTHON_VERSION}" "$@"
return
fi
mypy --follow-imports skip "$@"
mypy --follow-imports skip --python-version "${PYTHON_VERSION}" "$@"
}
run_mypy # Note that this is less strict than CI
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment