Skip to content

Commit 8759549

Browse files
authored
Adjust sdk syntax code for python less than 3.10 (#270)
1 parent b61ed98 commit 8759549

File tree

1 file changed

+10
-2
lines changed
  • packages/sdk/python/human-protocol-sdk/human_protocol_sdk

1 file changed

+10
-2
lines changed

packages/sdk/python/human-protocol-sdk/human_protocol_sdk/job.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
import os
44
from decimal import Decimal
55
from enum import Enum
6-
from typing import Dict, List, Tuple, Optional, Any, TypedDict
6+
from typing import (
7+
Dict,
8+
List,
9+
Tuple,
10+
Optional,
11+
Any,
12+
TypedDict,
13+
Union
14+
)
715

816
from basemodels import Manifest
917
from eth_keys import keys
@@ -1936,7 +1944,7 @@ def _check_transfer_event(self, tx_receipt: Optional[TxReceipt]) -> bool:
19361944
return True
19371945
return False
19381946

1939-
def _find_operator(self, addr: Optional[str]) -> Tuple[str, str] | None:
1947+
def _find_operator(self, addr: Optional[str]) -> Union[Tuple[str, str], None]:
19401948
"""
19411949
Find the operator to execute the transaction from trusted wallets.
19421950

0 commit comments

Comments
 (0)