Skip to content

Commit 44d4e1d

Browse files
committed
Small type fix for 3.9
1 parent 6c27f7e commit 44d4e1d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pandas = "^2.2.2"
2020
eval-type-backport = "^0.2.0" # For 3.9 future annotations
2121
elasticsearch = "^8.13.2"
2222
xmltodict = "^0.13.0"
23+
types-colorama = "^0.4.15.20240311"
2324

2425
vllm = { version = "0.5.0", optional = true }
2526
transformers = { version = "^4.41.0", optional = true }
@@ -31,7 +32,7 @@ click = { version = "^8.1.7", optional = true }
3132
httpx = { version = "^0.27.0", optional = true }
3233
aiodocker = { version = "^0.22.2", optional = true }
3334
websockets = { version = "^13.0", optional = true }
34-
types-colorama = "^0.4.15.20240311"
35+
3536

3637
[tool.poetry.extras]
3738
examples = ["asyncssh", "types-requests", "click", "httpx", "aiodocker", "websockets"]

rigging/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ async def _post_run(self, chats: list[Chat], on_failed: FailMode) -> ChatList:
10241024
for then_callback in self.then_callbacks:
10251025
coros = [then_callback(chat) for chat in chats]
10261026
new_chats = await asyncio.gather(*coros)
1027-
if not all(isinstance(c, Chat | None) for c in new_chats):
1027+
if not all(isinstance(c, Chat) or c is None for c in new_chats):
10281028
raise ValueError(
10291029
f".then() callback must return a Chat object or None ({then_callback.__call__.__name__})"
10301030
)

0 commit comments

Comments
 (0)