From c9ac67e985914bb3700c3401eeb95eb1f437cba0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 16 May 2021 14:50:25 +0200 Subject: [PATCH] Fix some typos --- freqtrade/exchange/exchange.py | 4 ++-- freqtrade/freqtradebot.py | 8 ++++---- tests/exchange/test_exchange.py | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index c0674cd05..93d8f7584 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -466,7 +466,7 @@ class Exchange: def amount_to_precision(self, pair: str, amount: float) -> float: ''' Returns the amount to buy or sell to a precision the Exchange accepts - Reimplementation of ccxt internal methods - ensuring we can test the result is correct + Re-implementation of ccxt internal methods - ensuring we can test the result is correct based on our definitions. ''' if self.markets[pair]['precision']['amount']: @@ -480,7 +480,7 @@ class Exchange: def price_to_precision(self, pair: str, price: float) -> float: ''' Returns the price rounded up to the precision the Exchange accepts. - Partial Reimplementation of ccxt internal method decimal_to_precision(), + Partial Re-implementation of ccxt internal method decimal_to_precision(), which does not support rounding up TODO: If ccxt supports ROUND_UP for decimal_to_precision(), we could remove this and align with amount_to_precision(). diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 9bfc343f6..0bef29dd4 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -267,7 +267,7 @@ class FreqtradeBot(LoggingMixin): def update_closed_trades_without_assigned_fees(self): """ Update closed trades without close fees assigned. - Only acts when Orders are in the database, otherwise the last orderid is unknown. + Only acts when Orders are in the database, otherwise the last order-id is unknown. """ if self.config['dry_run']: # Updating open orders in dry-run does not make sense and will fail. @@ -1223,7 +1223,7 @@ class FreqtradeBot(LoggingMixin): self.update_trade_state(trade, trade.open_order_id, order) Trade.query.session.flush() - # Lock pair for one candle to prevent immediate rebuys + # Lock pair for one candle to prevent immediate re-buys self.strategy.lock_pair(trade.pair, datetime.now(timezone.utc), reason='Auto lock') @@ -1327,7 +1327,7 @@ class FreqtradeBot(LoggingMixin): Handles closing both buy and sell orders. :param trade: Trade object of the trade we're analyzing :param order_id: Order-id of the order we're analyzing - :param action_order: Already aquired order object + :param action_order: Already acquired order object :return: True if order has been cancelled without being filled partially, False otherwise """ if not order_id: @@ -1397,7 +1397,7 @@ class FreqtradeBot(LoggingMixin): def get_real_amount(self, trade: Trade, order: Dict) -> float: """ Detect and update trade fee. - Calls trade.update_fee() uppon correct detection. + Calls trade.update_fee() upon correct detection. Returns modified amount if the fee was taken from the destination currency. Necessary for exchanges which charge fees in base currency (e.g. binance) :return: identical (or new) amount for the trade diff --git a/tests/exchange/test_exchange.py b/tests/exchange/test_exchange.py index 54ffabd4f..b6b395802 100644 --- a/tests/exchange/test_exchange.py +++ b/tests/exchange/test_exchange.py @@ -2124,7 +2124,6 @@ def test_cancel_stoploss_order_with_result(default_conf, mocker, exchange_name): exchange.cancel_stoploss_order_with_result(order_id='_', pair='TKN/BTC', amount=123) - @pytest.mark.parametrize("exchange_name", EXCHANGES) def test_fetch_order(default_conf, mocker, exchange_name): default_conf['dry_run'] = True