[CI/Build] mypy: check vllm/entrypoints (#9194)

Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
Russell Bryant 2024-10-09 13:15:28 -04:00 committed by GitHub
parent ca77dd7a44
commit cdca8994bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -19,7 +19,7 @@ run_mypy vllm/attention
#run_mypy vllm/core #run_mypy vllm/core
run_mypy vllm/distributed run_mypy vllm/distributed
run_mypy vllm/engine run_mypy vllm/engine
#run_mypy vllm/entrypoints run_mypy vllm/entrypoints
run_mypy vllm/executor run_mypy vllm/executor
#run_mypy vllm/inputs #run_mypy vllm/inputs
run_mypy vllm/logging run_mypy vllm/logging

View File

@ -514,10 +514,13 @@ class LLM:
# Handle multi and single conversations # Handle multi and single conversations
if is_list_of(messages, list): if is_list_of(messages, list):
# messages is List[List[...]] # messages is List[List[...]]
list_of_messages = messages list_of_messages = cast(List[List[ChatCompletionMessageParam]],
messages)
else: else:
# messages is List[...] # messages is List[...]
list_of_messages = [messages] list_of_messages = [
cast(List[ChatCompletionMessageParam], messages)
]
prompts: List[Union[TokensPrompt, TextPrompt]] = [] prompts: List[Union[TokensPrompt, TextPrompt]] = []