diff --git a/fin_depo/data.py b/fin_depo/data.py index f82d29a..2a0f228 100644 --- a/fin_depo/data.py +++ b/fin_depo/data.py @@ -44,6 +44,9 @@ class DepoSingle(Depo): _assets: Mapping[Asset, Decimal] + def __post_init__(self): + assert None not in self._assets + def assets(self) -> Iterable[Asset]: return self._assets @@ -58,6 +61,9 @@ class DepoGroup(Depo): nested: list[Depo] + def __post_init__(self): + assert None not in self.nested + def assets(self) -> Iterable[Asset]: assets: set[Asset] = set() for nested_depo in self.nested: diff --git a/fin_depo/defi_kraken.py b/fin_depo/defi_kraken.py index 4e30861..249f799 100644 --- a/fin_depo/defi_kraken.py +++ b/fin_depo/defi_kraken.py @@ -59,4 +59,4 @@ def parse_asset_from_ticker(ticker: str) -> fin_defs.Asset: account = ticker.removesuffix('.HOLD') if account == 'ZEUR': return fin_defs.EUR - asset = fin_defs.WELL_KNOWN_SYMBOLS[account] + return fin_defs.WELL_KNOWN_SYMBOLS[account]