[MyPy][2/N] Fix mypy errors in small tests/ dirs (#51043)
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> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Harry Mellor
Claude Opus 5.5
parent
a96ee5935d
commit
5dd693122c
@@ -101,13 +101,13 @@ async def test_tokenize_chat(
|
||||
if continue_final:
|
||||
conversation.append({"role": "assistant", "content": "Sure,"})
|
||||
|
||||
prompt = tokenizer.apply_chat_template(
|
||||
prompt = tokenizer.apply_chat_template( # type: ignore[call-arg]
|
||||
add_generation_prompt=add_generation,
|
||||
continue_final_message=continue_final,
|
||||
conversation=conversation,
|
||||
tokenize=False,
|
||||
)
|
||||
tokens = tokenizer.encode(prompt, add_special_tokens=add_special)
|
||||
tokens = tokenizer.encode(prompt, add_special_tokens=add_special) # type: ignore[arg-type]
|
||||
|
||||
response = requests.post(
|
||||
server.url_for("tokenize"),
|
||||
@@ -169,14 +169,14 @@ async def test_tokenize_chat_with_tools(
|
||||
if continue_final:
|
||||
conversation.append({"role": "assistant", "content": "Sure,"})
|
||||
|
||||
prompt = tokenizer.apply_chat_template(
|
||||
prompt = tokenizer.apply_chat_template( # type: ignore[call-arg]
|
||||
add_generation_prompt=add_generation,
|
||||
continue_final_message=continue_final,
|
||||
conversation=conversation,
|
||||
tools=tools,
|
||||
tokenize=False,
|
||||
)
|
||||
tokens = tokenizer.encode(prompt, add_special_tokens=add_special)
|
||||
tokens = tokenizer.encode(prompt, add_special_tokens=add_special) # type: ignore[arg-type]
|
||||
|
||||
response = requests.post(
|
||||
server.url_for("tokenize"),
|
||||
|
||||
Reference in New Issue
Block a user