[CI] Fix mypy for vllm/v1/core and vllm/v1/engine (#27108)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2025-10-30 11:32:17 +00:00
committed by GitHub
parent c7d2a554ba
commit c01f6e525f
12 changed files with 91 additions and 61 deletions
+8 -2
View File
@@ -44,10 +44,16 @@ class RequestOutputCollector:
if self.output is None or isinstance(output, Exception):
self.output = output
self.ready.set()
elif isinstance(self.output, (RequestOutput, PoolingRequestOutput)):
elif isinstance(self.output, RequestOutput) and isinstance(
output, RequestOutput
):
# This ensures that request outputs with different request indexes
# (if n > 1) do not override each other.
self.output.add(output, aggregate=self.aggregate)
elif isinstance(self.output, PoolingRequestOutput) and isinstance(
output, PoolingRequestOutput
):
self.output = output
async def get(self) -> RequestOutput | PoolingRequestOutput:
"""Get operation blocks on put event."""
@@ -408,7 +414,7 @@ class OutputProcessor:
within the loop below.
"""
request_outputs: list[RequestOutput] | list[PoolingRequestOutput] = []
request_outputs: list[RequestOutput | PoolingRequestOutput] = []
reqs_to_abort: list[str] = []
for engine_core_output in engine_core_outputs:
req_id = engine_core_output.request_id