Unverified Commit cbdc4ad5 authored by Cyrus Leung's avatar Cyrus Leung Committed by GitHub
Browse files

[Ci/Build] Fix mypy errors on main (#12296)


Signed-off-by: default avatarDarkLight1337 <tlleungac@connect.ust.hk>
parent 016e3676
...@@ -43,7 +43,7 @@ class PromptReplacementDetails: ...@@ -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: ...@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment