mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-09-09 03:47:03 +08:00
[Ci/Build] Fix mypy errors on main (#12296)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
parent
016e3676e7
commit
cbdc4ad5a5
@ -43,7 +43,7 @@ class PromptReplacementDetails:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_seq(seq: _PromptSeq):
|
def from_seq(seq: _PromptSeq) -> "PromptReplacementDetails":
|
||||||
return PromptReplacementDetails(full=seq, features=seq)
|
return PromptReplacementDetails(full=seq, features=seq)
|
||||||
|
|
||||||
|
|
||||||
@ -132,7 +132,10 @@ class _BoundPromptSequence:
|
|||||||
_token_ids: Optional[list[int]]
|
_token_ids: Optional[list[int]]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_seq(tokenizer: AnyTokenizer, seq: _PromptSeq):
|
def from_seq(
|
||||||
|
tokenizer: AnyTokenizer,
|
||||||
|
seq: _PromptSeq,
|
||||||
|
) -> "_BoundPromptSequence":
|
||||||
return _BoundPromptSequence(
|
return _BoundPromptSequence(
|
||||||
tokenizer=tokenizer,
|
tokenizer=tokenizer,
|
||||||
_text=seq if isinstance(seq, str) else None,
|
_text=seq if isinstance(seq, str) else None,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user