summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruvok2025-04-18 20:16:53 +0200
committeruvok2025-04-18 20:16:53 +0200
commit5cacae7a89eb54d0597e09340f0dd529d2329265 (patch)
tree607b01ae2a43c130fe041c801b9df65a91379323
parent45c51fad25bc6e2942e2a15463ca0cd669a840e2 (diff)
Type annotations
-rw-r--r--ledger_process.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ledger_process.py b/ledger_process.py
index 99e48ba..357857a 100644
--- a/ledger_process.py
+++ b/ledger_process.py
@@ -49,7 +49,7 @@ class LedgerProcess:
elif action.type == "withdrawal":
self._process_withdrawal(action)
- def _process_deposit(self, action: LedgerAction):
+ def _process_deposit(self, action: LedgerAction) -> None:
assert action.amount > 0
assert action.fee >= 0
@@ -64,7 +64,7 @@ class LedgerProcess:
t.remove_coins(action.fee)
wallet.add_trade(t)
- def _process_withdrawal(self, action: LedgerAction):
+ def _process_withdrawal(self, action: LedgerAction) -> None:
assert action.amount < 0
assert action.fee >= 0
@@ -77,7 +77,7 @@ class LedgerProcess:
t.remove_coins(action.fee)
self.external_wallet[currency].add_trade(t)
- def _process_trade(self, refid: str, trades: List[LedgerAction]):
+ def _process_trade(self, refid: str, trades: List[LedgerAction]) -> None:
if len(trades) == 2: # Ensure we have two related rows (EUR + crypto)
eur_trade = next((trade for trade in trades if trade.asset == "EUR"), None)
crypto_trade = next(