[MyPy][1/N] Fix mypy errors in some tests/ directories and enforce follow-imports=silent (#49570)

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Martin Hickey
2026-07-30 05:02:51 -07:00
committed by GitHub
co-authored by Harry Mellor
parent 89d97d9a16
commit 38a267cdd5
30 changed files with 166 additions and 101 deletions
+8 -3
View File
@@ -9,7 +9,7 @@ import pytest
from tests.v1.shutdown.utils import SHUTDOWN_TEST_TIMEOUT_SEC
from vllm import SamplingParams
from vllm.engine.arg_utils import AsyncEngineArgs
from vllm.inputs import TokensPrompt
from vllm.inputs import ExplicitEncoderDecoderPrompt
from vllm.sampling_params import RequestOutputKind
from vllm.v1.engine.async_llm import AsyncLLM
from vllm.v1.engine.exceptions import EngineGenerateError
@@ -29,9 +29,14 @@ async def test_async_llm_processor_error(model: str) -> None:
async_llm = AsyncLLM.from_engine_args(engine_args)
async def generate(request_id: str):
# [] is not allowed and will raise a ValueError in Processor.
# An encoder/decoder prompt is rejected by the Processor for a
# decoder only model.
generator = async_llm.generate(
TokensPrompt([]), request_id=request_id, sampling_params=SamplingParams()
ExplicitEncoderDecoderPrompt(
encoder_prompt="Hello my name is", decoder_prompt=None
),
request_id=request_id,
sampling_params=SamplingParams(),
)
try:
async for _ in generator: