Skip to content

Commit

Permalink
Small type fix for 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
monoxgas committed Aug 28, 2024
1 parent 6c27f7e commit 44d4e1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pandas = "^2.2.2"
eval-type-backport = "^0.2.0" # For 3.9 future annotations
elasticsearch = "^8.13.2"
xmltodict = "^0.13.0"
types-colorama = "^0.4.15.20240311"

vllm = { version = "0.5.0", optional = true }
transformers = { version = "^4.41.0", optional = true }
Expand All @@ -31,7 +32,7 @@ click = { version = "^8.1.7", optional = true }
httpx = { version = "^0.27.0", optional = true }
aiodocker = { version = "^0.22.2", optional = true }
websockets = { version = "^13.0", optional = true }
types-colorama = "^0.4.15.20240311"


[tool.poetry.extras]
examples = ["asyncssh", "types-requests", "click", "httpx", "aiodocker", "websockets"]
Expand Down
2 changes: 1 addition & 1 deletion rigging/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ async def _post_run(self, chats: list[Chat], on_failed: FailMode) -> ChatList:
for then_callback in self.then_callbacks:
coros = [then_callback(chat) for chat in chats]
new_chats = await asyncio.gather(*coros)
if not all(isinstance(c, Chat | None) for c in new_chats):
if not all(isinstance(c, Chat) or c is None for c in new_chats):
raise ValueError(
f".then() callback must return a Chat object or None ({then_callback.__call__.__name__})"
)
Expand Down

0 comments on commit 44d4e1d

Please sign in to comment.