Skip to content

Commit 8773714

Browse files
authored
Ignore type error in test introduced by ollama 0.4.2 (#1791)
1 parent 46d8ab8 commit 8773714

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/pytest/test_chat.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,12 @@ def test_as_ollama_message():
476476
import ollama
477477
from ollama import Message as OllamaMessage
478478

479-
assert "ollama._types.Message" in str(ollama.chat.__annotations__["messages"])
479+
# ollama 0.4.2 added Callable to the type hints, but pyright complains about
480+
# missing arguments to the Callable type. We'll ignore this for now.
481+
# https://github.com/ollama/ollama-python/commit/b50a65b
482+
chat = ollama.chat # type: ignore
483+
484+
assert "ollama._types.Message" in str(chat.__annotations__["messages"])
480485

481486
from shiny.ui._chat_provider_types import as_ollama_message
482487

0 commit comments

Comments
 (0)