From 00aa1bee9d8724ad31b0ce50829c5519ff5e2c31 Mon Sep 17 00:00:00 2001 From: Gert Wohlgemuth Date: Tue, 1 May 2018 22:23:11 -0700 Subject: [PATCH] fixed styling issues --- freqtrade/__init__.py | 5 ++-- freqtrade/freqtradebot.py | 56 +++++++++++++++++++-------------------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py index 06f0e706c..97e724a01 100644 --- a/freqtrade/__init__.py +++ b/freqtrade/__init__.py @@ -18,6 +18,7 @@ class OperationalException(BaseException): class NotEnoughFundsExeption(BaseException): """ - This happens when the exchange reports that not enough funds where available. We do not want to stop - the bot in this case and just keep it going and suppress this message + This happens when the exchange reports that not enough funds where available. + We do not want to stop the bot in this case and just keep it going and suppress + this message """ diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 8ac856543..1a162bd29 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -184,9 +184,9 @@ class FreqtradeBot(object): self.rpc.send_msg( '*Status:* OperationalException:\n```\n{traceback}```{hint}' .format( - traceback=traceback.format_exc(), - hint='Issue `/start` if you think it is safe to restart.' - ) + traceback=traceback.format_exc(), + hint='Issue `/start` if you think it is safe to restart.' + ) ) logger.exception('OperationalException. Stopping trader ...') self.state = State.STOPPED @@ -306,15 +306,15 @@ class FreqtradeBot(object): self.rpc.send_msg( '*{}:* Buying [{}]({}) with limit `{:.8f} ({:.6f} {}, {:.3f} {})` ' .format( - exchange.get_name().upper(), - pair.replace('_', '/'), - exchange.get_pair_detail_url(pair), - buy_limit, - stake_amount, - self.config['stake_currency'], - stake_amount_fiat, - self.config['fiat_display_currency'] - ) + exchange.get_name().upper(), + pair.replace('_', '/'), + exchange.get_pair_detail_url(pair), + buy_limit, + stake_amount, + self.config['stake_currency'], + stake_amount_fiat, + self.config['fiat_display_currency'] + ) ) # Fee is applied twice because we make a LIMIT_BUY and LIMIT_SELL trade = Trade( @@ -488,15 +488,15 @@ class FreqtradeBot(object): "*Current Rate:* `{current_rate:.8f}`\n" \ "*Profit:* `{profit:.2f}%`" \ "".format( - exchange=trade.exchange, - pair=trade.pair, - pair_url=exchange.get_pair_detail_url(trade.pair), - limit=limit, - open_rate=trade.open_rate, - current_rate=current_rate, - amount=round(trade.amount, 8), - profit=round(profit * 100, 2), - ) + exchange=trade.exchange, + pair=trade.pair, + pair_url=exchange.get_pair_detail_url(trade.pair), + limit=limit, + open_rate=trade.open_rate, + current_rate=current_rate, + amount=round(trade.amount, 8), + profit=round(profit * 100, 2), + ) # For regular case, when the configuration exists if 'stake_currency' in self.config and 'fiat_display_currency' in self.config: @@ -509,13 +509,13 @@ class FreqtradeBot(object): message += '` ({gain}: {profit_percent:.2f}%, {profit_coin:.8f} {coin}`' \ '` / {profit_fiat:.3f} {fiat})`' \ ''.format( - gain="profit" if fmt_exp_profit > 0 else "loss", - profit_percent=fmt_exp_profit, - profit_coin=profit_trade, - coin=self.config['stake_currency'], - profit_fiat=profit_fiat, - fiat=self.config['fiat_display_currency'], - ) + gain="profit" if fmt_exp_profit > 0 else "loss", + profit_percent=fmt_exp_profit, + profit_coin=profit_trade, + coin=self.config['stake_currency'], + profit_fiat=profit_fiat, + fiat=self.config['fiat_display_currency'], + ) # Because telegram._forcesell does not have the configuration # Ignore the FIAT value and does not show the stake_currency as well else: