From a3835b1279d0d0b7fd7df2b34d9a74d6b2db0cf8 Mon Sep 17 00:00:00 2001 From: Misagh Date: Wed, 3 Apr 2019 14:14:47 +0200 Subject: [PATCH] flake8 --- freqtrade/edge/__init__.py | 16 +++++++--------- freqtrade/rpc/rpc.py | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/freqtrade/edge/__init__.py b/freqtrade/edge/__init__.py index 0f70df43b..7bda942d2 100644 --- a/freqtrade/edge/__init__.py +++ b/freqtrade/edge/__init__.py @@ -206,19 +206,17 @@ class Edge(): def accepted_pairs(self) -> list: """ return a list of accepted pairs along with their winrate, expectancy and stoploss - ex: - #[{'Pair': 'ADX/ETH', 'Winrate': 0.08333333333333333, 'Expectancy': -0.8105153934775888, 'Stoploss': -0.02}] """ final = [] for pair, info in self._cached_pairs.items(): if info.expectancy > float(self.edge_config.get('minimum_expectancy', 0.2)) and \ - info.winrate > float(self.edge_config.get('minimum_winrate', 0.60)): - final.append({ - 'Pair': pair, - 'Winrate': info.winrate, - 'Expectancy': info.expectancy, - 'Stoploss': info.stoploss, - }) + info.winrate > float(self.edge_config.get('minimum_winrate', 0.60)): + final.append({ + 'Pair': pair, + 'Winrate': info.winrate, + 'Expectancy': info.expectancy, + 'Stoploss': info.stoploss, + }) return final def _fill_calculable_fields(self, result: DataFrame) -> DataFrame: diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 79bfffb1d..ceab00373 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -484,4 +484,4 @@ class RPC(object): """ Returns information related to Edge """ if not self._freqtrade.edge: raise RPCException(f'Edge is not enabled.') - return self._freqtrade.edge.accepted_pairs() \ No newline at end of file + return self._freqtrade.edge.accepted_pairs()