Skip to content

Commit 9c69380

Browse files
Action: corrected typing hint, __repr__() to quickly see what an Action is all about
1 parent 0fe3039 commit 9c69380

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

data/action.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
from datetime import datetime
33

44
class Action:
5-
def __init__(self, timestamp: datetime, tx_hash: str, block_number: str, swap_fee: str, denorms: typing.Dict, action_type: str, action: typing.Dict):
5+
def __init__(self, timestamp: datetime, tx_hash: str, block_number: str, swap_fee: str, denorms: typing.Dict, action_type: str, action: typing.List):
66
self.timestamp = timestamp
77
self.tx_hash = tx_hash
88
self.block_number = block_number
99
self.swap_fee = swap_fee
1010
self.denorms = denorms
1111
self.action_type = action_type
1212
self.action = action
13+
14+
def __repr__(self):
15+
return f'Action: {self.tx_hash} {len(self.action)} {self.action_type}'

0 commit comments

Comments
 (0)