From a5bfa5515cbdbab500dbe9df614730107804bacd Mon Sep 17 00:00:00 2001 From: "Paul D. Mendes" Date: Mon, 11 May 2020 20:13:06 +0400 Subject: [PATCH] Fix flake8 mypy --- freqtrade/data/dataprovider.py | 2 +- tests/data/test_dataprovider.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/freqtrade/data/dataprovider.py b/freqtrade/data/dataprovider.py index 01397d6b7..984652e24 100644 --- a/freqtrade/data/dataprovider.py +++ b/freqtrade/data/dataprovider.py @@ -22,7 +22,7 @@ class DataProvider: def __init__(self, config: dict, exchange: Exchange, pairlists=None) -> None: self._config = config self._exchange = exchange - self._pairlists: Optional = pairlists + self._pairlists = pairlists def refresh(self, pairlist: List[Tuple[str, str]], diff --git a/tests/data/test_dataprovider.py b/tests/data/test_dataprovider.py index 247703619..45ce1c009 100644 --- a/tests/data/test_dataprovider.py +++ b/tests/data/test_dataprovider.py @@ -164,7 +164,9 @@ def test_current_whitelist(exchange, PairListManager, default_conf): # Simulate volumepairs from exchange. # pairlist.refresh_pairlist() - # Set the pairs manually... this would be done in refresh pairlist default whitelist + volumePL - blacklist + + # Set the pairs manually... this would be done in refresh pairlist + # default whitelist + volumePL - blacklist default_whitelist = default_conf['exchange']['pair_whitelist'] default_blacklist = default_conf['exchange']['pair_blacklist'] volume_pairlist = ['ETH/BTC', 'LINK/BTC', 'ZRX/BTC', 'BCH/BTC', 'XRP/BTC'] @@ -176,6 +178,6 @@ def test_current_whitelist(exchange, PairListManager, default_conf): assert dp.current_whitelist() == pairlist._whitelist - with pytest.raises(OperationalException) as e: + with pytest.raises(OperationalException): dp = DataProvider(default_conf, exchange) dp.current_whitelist()