From c9b62cf19f1bd3d9efca004731e582c2d563ca0f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste LE STANG Date: Sat, 30 Dec 2017 10:40:00 +0100 Subject: [PATCH] fix code review from @garcq --- freqtrade/main.py | 6 +++--- freqtrade/tests/test_acl_pair.py | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/freqtrade/main.py b/freqtrade/main.py index 60f561c7a..18bc04e6f 100755 --- a/freqtrade/main.py +++ b/freqtrade/main.py @@ -29,8 +29,8 @@ _CONF = {} def refresh_whitelist(whitelist: List[str]) -> List[str]: """ Check wallet health and remove pair from whitelist if necessary - :param whitelist: a new whitelist (optional) - :return: None + :param whitelist: the pair the user might want to trade + :return: the list of pairs the user wants to trade without the one unavailable or black_listed """ sanitized_whitelist = [] health = exchange.get_wallet_health() @@ -52,7 +52,7 @@ def _process(nb_assets: Optional[int] = 0) -> bool: """ Queries the persistence layer for open trades and handles them, otherwise a new trade is created. - :param: dynamic_whitelist: True is a dynamic whitelist should be generated (optional) + :param: nb_assets: the maximum number of pairs to be traded at the same time :return: True if a trade has been created or closed, False otherwise """ state_changed = False diff --git a/freqtrade/tests/test_acl_pair.py b/freqtrade/tests/test_acl_pair.py index a37113ae0..f898fb082 100644 --- a/freqtrade/tests/test_acl_pair.py +++ b/freqtrade/tests/test_acl_pair.py @@ -49,8 +49,6 @@ def test_refresh_whitelist(mocker): mocker.patch.multiple('freqtrade.main.exchange', get_wallet_health=get_health) refreshedwhitelist = refresh_whitelist(conf['exchange']['pair_whitelist']) - print(conf['exchange']['pair_whitelist']) - print(refreshedwhitelist) whitelist = ['BTC_ETH', 'BTC_TKN'] # Ensure all except those in whitelist are removed assert_list_equal(whitelist, refreshedwhitelist)