From b938c536fa5cd61f86311e6e83d3901228cc91b9 Mon Sep 17 00:00:00 2001 From: Theagainmen <24569139+Theagainmen@users.noreply.github.com> Date: Sat, 27 Jun 2020 21:46:53 +0200 Subject: [PATCH] Trying to fix flake8 errors --- freqtrade/freqtradebot.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index e3bb5b70b..6d9002c77 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -180,16 +180,16 @@ class FreqtradeBot: Notify the user when the bot is stopped and there are still open trades active. """ - open_trades = Trade.get_trades([Trade.is_open == True, - ]).all() + open_trades = Trade.get_trades([Trade.is_open == 1, + ]).all() - if len(open_trades) is not 0: + if len(open_trades) != 0: msg = { - f'type': RPCMessageType.WARNING_NOTIFICATION, - f'status': f'{len(open_trades)} open trades active.\n\n' + 'type': RPCMessageType.WARNING_NOTIFICATION, + 'status': f'{len(open_trades)} open trades active.\n\n' f'Handle these trades manually on {self.exchange.name}, ' f'or \'/start\' the bot again and use \'/stopbuy\' ' - f'to handle open trades gracefully.' + f'to handle open trades gracefully.', } self.rpc.send_msg(msg)