We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e91dc1d commit 1aef599Copy full SHA for 1aef599
src/aleph/sdk/node.py
@@ -1,6 +1,7 @@
1
import asyncio
2
import json
3
import logging
4
+import typing
5
from datetime import datetime
6
from functools import partial
7
from pathlib import Path
@@ -265,7 +266,7 @@ def __str__(self) -> str:
265
266
267
@staticmethod
268
def add(messages: Union[AlephMessage, Iterable[AlephMessage]]):
- if isinstance(messages, AlephMessage):
269
+ if isinstance(messages, typing.get_args(AlephMessage)):
270
messages = [messages]
271
272
data_source = (message_to_model(message) for message in messages)
0 commit comments