replace currecny package, use set not list
This commit is contained in:
parent
19eea483e5
commit
1fbdfb34c0
2 changed files with 5 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import pathlib
|
||||
from dataclasses import dataclass
|
||||
|
||||
from currencies import Currency
|
||||
from money.currency import Currency
|
||||
|
||||
DEFAULT_CURRENCIES = {Currency("EUR"), Currency("GBP"), Currency("USD")}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import logging
|
|||
import pathlib
|
||||
from typing import Union
|
||||
|
||||
from currencies import Currency
|
||||
from money.currency import Currency
|
||||
|
||||
from xexe.constants import DEFAULT_CURRENCIES
|
||||
from xexe.utils import DateRange
|
||||
|
|
@ -26,9 +26,9 @@ def handle_get_rates_inputs(
|
|||
date_range.end_date = datetime.datetime.today().date()
|
||||
|
||||
if currencies:
|
||||
# CLI input comes as string of comma-separated currency codes
|
||||
currencies = [currency_code.strip() for currency_code in currencies.split(",")]
|
||||
tmp = [Currency(currency_code) for currency_code in currencies]
|
||||
# CLI input comes as a string of comma-separated currency codes
|
||||
currencies = {currency_code.strip() for currency_code in currencies.split(",")}
|
||||
tmp = {Currency(currency_code) for currency_code in currencies}
|
||||
currencies = tmp
|
||||
|
||||
if currencies is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue