This commit is contained in:
parent
b9e8f22801
commit
5bda09911c
|
@ -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:
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue
Block a user