Skip to content

Commit

Permalink
Small formatting upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Nov 11, 2021
1 parent f8d30ab commit ce2aa1d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
2 changes: 0 additions & 2 deletions freqtrade/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


class FreqtradeException(Exception):
"""
Freqtrade base exception. Handled at the outermost level.
Expand Down
2 changes: 1 addition & 1 deletion freqtrade/strategy/hyper.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def __init__(self, *, default: Optional[Any] = None,
load=load, **kwargs)


class HyperStrategyMixin(object):
class HyperStrategyMixin:
"""
A helper base class which allows HyperOptAuto class to reuse implementations of buy/sell
strategy logic.
Expand Down
2 changes: 1 addition & 1 deletion freqtrade/strategy/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
CUSTOM_SELL_MAX_LENGTH = 64


class SellCheckTuple(object):
class SellCheckTuple:
"""
NamedTuple for Sell type + reason
"""
Expand Down
2 changes: 1 addition & 1 deletion freqtrade/wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _update_dry(self) -> None:
tot_profit = Trade.get_total_closed_profit()
else:
tot_profit = LocalTrade.total_profit
tot_in_trades = sum([trade.stake_amount for trade in open_trades])
tot_in_trades = sum(trade.stake_amount for trade in open_trades)

current_stake = self.start_cap + tot_profit - tot_in_trades
_wallets[self._config['stake_currency']] = Wallet(
Expand Down
8 changes: 4 additions & 4 deletions scripts/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self, serverurl, username=None, password=None):
def _call(self, method, apipath, params: dict = None, data=None, files=None):

if str(method).upper() not in ('GET', 'POST', 'PUT', 'DELETE'):
raise ValueError('invalid method <{0}>'.format(method))
raise ValueError(f'invalid method <{method}>')
basepath = f"{self._serverurl}/api/v1/{apipath}"

hd = {"Accept": "application/json",
Expand Down Expand Up @@ -124,7 +124,7 @@ def delete_lock(self, lock_id):
:param lock_id: ID for the lock to delete
:return: json object
"""
return self._delete("locks/{}".format(lock_id))
return self._delete(f"locks/{lock_id}")

def daily(self, days=None):
"""Return the profits for each day, and amount of trades.
Expand Down Expand Up @@ -220,7 +220,7 @@ def trade(self, trade_id):
:param trade_id: Specify which trade to get.
:return: json object
"""
return self._get("trade/{}".format(trade_id))
return self._get(f"trade/{trade_id}")

def delete_trade(self, trade_id):
"""Delete trade from the database.
Expand All @@ -229,7 +229,7 @@ def delete_trade(self, trade_id):
:param trade_id: Deletes the trade with this ID from the database.
:return: json object
"""
return self._delete("trades/{}".format(trade_id))
return self._delete(f"trades/{trade_id}")

def whitelist(self):
"""Show the current whitelist.
Expand Down
1 change: 0 additions & 1 deletion tests/test_plotting.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from copy import deepcopy
from pathlib import Path
from unittest.mock import MagicMock
Expand Down

0 comments on commit ce2aa1d

Please sign in to comment.