Skip to content

Commit

Permalink
mypy: Create tools/mypy.sh
Browse files Browse the repository at this point in the history
Create a new script, tools/mypy.sh, that is shared between format.sh
and the mypy github workflow. This will ensure that the set of
directories being checked stays consistent between CI and the local
dev environment.

Signed-off-by: Russell Bryant <[email protected]>
  • Loading branch information
russellb committed Oct 8, 2024
1 parent ccda438 commit 5a925a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 40 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,4 @@ jobs:
pip install types-setuptools
- name: Mypy
run: |
mypy
mypy tests --follow-imports skip
mypy vllm/attention --follow-imports skip
mypy vllm/distributed --follow-imports skip
mypy vllm/engine --follow-imports skip
mypy vllm/executor --follow-imports skip
mypy vllm/lora --follow-imports skip
mypy vllm/model_executor --follow-imports skip
mypy vllm/prompt_adapter --follow-imports skip
mypy vllm/spec_decode --follow-imports skip
mypy vllm/worker --follow-imports skip
tools/mypy.sh
29 changes: 1 addition & 28 deletions format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,36 +94,9 @@ else
fi
echo 'vLLM yapf: Done'

run_mypy() {
echo "Running mypy on $1"
mypy --follow-imports skip "$@"
}

# Run mypy
echo 'vLLM mypy:'
run_mypy # Note that this is less strict than CI
run_mypy tests
run_mypy vllm/assets
run_mypy vllm/attention
#run_mypy vllm/compilation
#run_mypy vllm/core
run_mypy vllm/distributed
run_mypy vllm/engine
#run_mypy vllm/entrypoints
run_mypy vllm/executor
#run_mypy vllm/inputs
run_mypy vllm/logging
run_mypy vllm/lora
run_mypy vllm/model_executor
run_mypy vllm/multimodal
run_mypy vllm/platforms
run_mypy vllm/plugins
run_mypy vllm/prompt_adapter
run_mypy vllm/spec_decode
run_mypy vllm/transformers_utils
run_mypy vllm/usage
#run_mypy vllm/vllm_flash_attn
run_mypy vllm/worker
tools/mypy.sh
echo 'vLLM mypy: Done'


Expand Down

0 comments on commit 5a925a9

Please sign in to comment.