From 5cacae7a89eb54d0597e09340f0dd529d2329265 Mon Sep 17 00:00:00 2001 From: uvok Date: Fri, 18 Apr 2025 20:16:53 +0200 Subject: Type annotations --- ledger_process.py | 6 +++--- 1 file 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( -- cgit v1.2.3