diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml index 256ed458c40b0..721c9c026cf16 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/mypy.yaml @@ -32,26 +32,17 @@ jobs: pip install types-setuptools - name: Mypy run: | - mypy tests --config-file pyproject.toml - mypy vllm/*.py --config-file pyproject.toml --follow-imports silent - mypy vllm/adapter_commons --config-file pyproject.toml --follow-imports silent - mypy vllm/assets --config-file pyproject.toml --follow-imports silent - mypy vllm/attention --config-file pyproject.toml - mypy vllm/core --config-file pyproject.toml - mypy vllm/distributed --config-file pyproject.toml - mypy vllm/engine --config-file pyproject.toml - mypy vllm/entrypoints --config-file pyproject.toml - mypy vllm/executor --config-file pyproject.toml - mypy vllm/inputs --config-file pyproject.toml --follow-imports silent - mypy vllm/logging --config-file pyproject.toml --follow-imports silent - mypy vllm/lora --config-file pyproject.toml - mypy vllm/model_executor --config-file pyproject.toml - mypy vllm/multimodal --config-file pyproject.toml --follow-imports silent - mypy vllm/platforms --config-file pyproject.toml --follow-imports silent - mypy vllm/prompt_adapter --config-file pyproject.toml - mypy vllm/spec_decode --config-file pyproject.toml - mypy vllm/transformers_utils --config-file pyproject.toml --follow-imports silent - mypy vllm/triton_utils --config-file pyproject.toml --follow-imports silent - mypy vllm/usage --config-file pyproject.toml --follow-imports silent - mypy vllm/worker --config-file pyproject.toml + mypy tests --follow-imports skip + mypy vllm/attention --follow-imports skip + mypy vllm/core --follow-imports skip + mypy vllm/distributed --follow-imports skip + mypy vllm/engine --follow-imports skip + mypy vllm/entrypoints --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 + mypy diff --git a/format.sh b/format.sh index 1bb565bf83333..71697cffacfb4 100755 --- a/format.sh +++ b/format.sh @@ -96,28 +96,19 @@ echo 'vLLM yapf: Done' # Run mypy echo 'vLLM mypy:' -mypy tests --config-file pyproject.toml -mypy vllm/*.py --config-file pyproject.toml --follow-imports silent -mypy vllm/adapter_commons --config-file pyproject.toml --follow-imports silent -mypy vllm/assets --config-file pyproject.toml --follow-imports silent -mypy vllm/attention --config-file pyproject.toml -mypy vllm/core --config-file pyproject.toml -mypy vllm/distributed --config-file pyproject.toml -mypy vllm/engine --config-file pyproject.toml -mypy vllm/entrypoints --config-file pyproject.toml -mypy vllm/executor --config-file pyproject.toml -mypy vllm/inputs --config-file pyproject.toml --follow-imports silent -mypy vllm/logging --config-file pyproject.toml --follow-imports silent -mypy vllm/lora --config-file pyproject.toml -mypy vllm/model_executor --config-file pyproject.toml -mypy vllm/multimodal --config-file pyproject.toml --follow-imports silent -mypy vllm/platforms --config-file pyproject.toml --follow-imports silent -mypy vllm/prompt_adapter --config-file pyproject.toml -mypy vllm/spec_decode --config-file pyproject.toml -mypy vllm/transformers_utils --config-file pyproject.toml --follow-imports silent -mypy vllm/triton_utils --config-file pyproject.toml --follow-imports silent -mypy vllm/usage --config-file pyproject.toml --follow-imports silent -mypy vllm/worker --config-file pyproject.toml +mypy tests --follow-imports skip +mypy vllm/attention --follow-imports skip +mypy vllm/core --follow-imports skip +mypy vllm/distributed --follow-imports skip +mypy vllm/engine --follow-imports skip +mypy vllm/entrypoints --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 +mypy # If git diff returns a file that is in the skip list, the file may be checked anyway: diff --git a/pyproject.toml b/pyproject.toml index 1ba1eacd90084..b0d115a091c45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,9 +48,22 @@ python_version = "3.8" ignore_missing_imports = true check_untyped_defs = true -follow_imports = "skip" +follow_imports = "silent" -files = "vllm" +# After fixing type errors resulting from follow_imports: "skip" -> "silent", +# move the directory here and remove it from format.sh and mypy.yaml +files = [ + "vllm/*.py", + "vllm/adapter_commons", + "vllm/assets", + "vllm/inputs", + "vllm/logging", + "vllm/multimodal", + "vllm/platforms", + "vllm/transformers_utils", + "vllm/triton_utils", + "vllm/usage", +] # TODO(woosuk): Include the code from Megatron and HuggingFace. exclude = [ "vllm/model_executor/parallel_utils/|vllm/model_executor/models/",