move function
This commit is contained in:
parent
8de0c72b14
commit
de8828a9cb
2 changed files with 11 additions and 6 deletions
|
|
@ -6,9 +6,13 @@ from typing import List
|
|||
from money.currency import Currency
|
||||
from xecd_rates_client import XecdClient
|
||||
|
||||
from xexe.constants import RATES_SOURCES
|
||||
from xexe.exchange_rates import ExchangeRates, add_equal_rates, add_inverse_rates
|
||||
from xexe.rate_fetching import MockRateFetcher, RateFetcher, XERateFetcher
|
||||
from xexe.rate_fetching import (
|
||||
MockRateFetcher,
|
||||
RateFetcher,
|
||||
XERateFetcher,
|
||||
build_rate_fetcher,
|
||||
)
|
||||
from xexe.rate_writing import CSVRateWriter, RateWriter
|
||||
from xexe.utils import DateRange, generate_currency_and_dates_combinations
|
||||
|
||||
|
|
@ -132,10 +136,6 @@ def write_rates_to_output(process_state, rates):
|
|||
rates_writer.write_rates(rates)
|
||||
|
||||
|
||||
def build_rate_fetcher(rates_source: str):
|
||||
return RATES_SOURCES[rates_source]()
|
||||
|
||||
|
||||
class GetRatesProcessState:
|
||||
def __init__(self, output: str, ignore_warnings: bool) -> None:
|
||||
self.writer = self._select_writer(output)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ from money.currency import Currency, CurrencyHelper
|
|||
from money.money import Money
|
||||
from xecd_rates_client import XecdClient
|
||||
|
||||
from xexe.constants import RATES_SOURCES
|
||||
from xexe.exchange_rates import ExchangeRate
|
||||
|
||||
|
||||
|
|
@ -79,3 +80,7 @@ class XERateFetcher(RateFetcher):
|
|||
rate_date=rate_date,
|
||||
rate=rate,
|
||||
)
|
||||
|
||||
|
||||
def build_rate_fetcher(rates_source: str):
|
||||
return RATES_SOURCES[rates_source]()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue