Skip to content

Commit

Permalink
fix compatibility with python < v3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
MHHukiewitz committed Aug 17, 2023
1 parent e91dc1d commit 1aef599
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/aleph/sdk/node.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import asyncio
import json
import logging
import typing
from datetime import datetime
from functools import partial
from pathlib import Path
Expand Down Expand Up @@ -265,7 +266,7 @@ def __str__(self) -> str:

@staticmethod
def add(messages: Union[AlephMessage, Iterable[AlephMessage]]):
if isinstance(messages, AlephMessage):
if isinstance(messages, typing.get_args(AlephMessage)):
messages = [messages]

data_source = (message_to_model(message) for message in messages)
Expand Down

0 comments on commit 1aef599

Please sign in to comment.