[CI] Fix mypy for vllm/reasoning (#35742)

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Martin Hickey
2026-03-12 12:21:33 +00:00
committed by GitHub
co-authored by Harry Mellor
parent 5282c7d4d0
commit 7f1f36bf91
21 changed files with 143 additions and 158 deletions
+5 -2
View File
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from collections.abc import Sequence
from pathlib import Path
from typing import TYPE_CHECKING, Any, cast, overload
@@ -434,7 +435,9 @@ class MistralTokenizer(TokenizerLike):
return_dict=False,
)
def decode(self, ids: list[int] | int, skip_special_tokens: bool = False) -> str:
def decode(
self, ids: Sequence[int] | int, skip_special_tokens: bool = False
) -> str:
# TODO(juliendenize): once https://github.com/huggingface/transformers/pull/41962
# is in, directly call self.transformers_tokenizer.decode(...).
if isinstance(ids, int):
@@ -512,7 +515,7 @@ class MistralTokenizer(TokenizerLike):
def convert_ids_to_tokens(
self,
ids: list[int],
ids: Sequence[int],
skip_special_tokens: bool = False,
) -> list[str]:
if not skip_special_tokens: