[CI] Fix mypy for vllm/v1/core and vllm/v1/engine (#27108)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user