simplify condition

This commit is contained in:
Janne Sinivirta 2017-12-25 09:52:58 +02:00
parent 79c2965388
commit 95fc9f8276

View File

@ -291,8 +291,7 @@ def gen_pair_whitelist(base_currency: str, topn: int = 20, key: str = 'BaseVolum
reverse=True reverse=True
) )
# topn must be greater than 0 if topn <= 0:
if not topn > 0:
topn = 20 topn = 20
return [s['MarketName'].replace('-', '_') for s in summaries[:topn]] return [s['MarketName'].replace('-', '_') for s in summaries[:topn]]