Skip to content

Commit 63e38f1

Browse files
russellbAlvant
authored andcommitted
[CI/Build] mypy: check vllm/entrypoints (vllm-project#9194)
Signed-off-by: Russell Bryant <[email protected]> Signed-off-by: Alvant <[email protected]>
1 parent bd30384 commit 63e38f1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tools/mypy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ run_mypy vllm/attention
1919
#run_mypy vllm/core
2020
run_mypy vllm/distributed
2121
run_mypy vllm/engine
22-
#run_mypy vllm/entrypoints
22+
run_mypy vllm/entrypoints
2323
run_mypy vllm/executor
2424
#run_mypy vllm/inputs
2525
run_mypy vllm/logging

vllm/entrypoints/llm.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,13 @@ def chat(
514514
# Handle multi and single conversations
515515
if is_list_of(messages, list):
516516
# messages is List[List[...]]
517-
list_of_messages = messages
517+
list_of_messages = cast(List[List[ChatCompletionMessageParam]],
518+
messages)
518519
else:
519520
# messages is List[...]
520-
list_of_messages = [messages]
521+
list_of_messages = [
522+
cast(List[ChatCompletionMessageParam], messages)
523+
]
521524

522525
prompts: List[Union[TokensPrompt, TextPrompt]] = []
523526

0 commit comments

Comments
 (0)