From 99144f613afd875bd6ef93cef2b4d969d9bce6c0 Mon Sep 17 00:00:00 2001 From: yunyaomingzheng <35861629+yunyaomingzheng@users.noreply.github.com> Date: Thu, 16 Dec 2021 18:23:49 +0800 Subject: [PATCH 1/2] flake8 fixed --- test/hummingbot/connector/exchange/mexc/test_mexc_exchange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/hummingbot/connector/exchange/mexc/test_mexc_exchange.py b/test/hummingbot/connector/exchange/mexc/test_mexc_exchange.py index bb33f39bfb3..3c6f4221bca 100644 --- a/test/hummingbot/connector/exchange/mexc/test_mexc_exchange.py +++ b/test/hummingbot/connector/exchange/mexc/test_mexc_exchange.py @@ -1022,7 +1022,7 @@ def test_execute_cancel_fail(self, mock_cancel, mock_main_app): self.exchange.execute_cancel(self.trading_pair, order.client_order_id) ) - self._is_logged("NETWORK", f"Failed to cancel order 0 : MexcAPIError('Order could not be canceled')") + self._is_logged("NETWORK", "Failed to cancel order 0 : MexcAPIError('Order could not be canceled')") @patch("aiohttp.ClientSession.request", new_callable=AsyncMock) def test_execute_cancel_cancels(self, mock_cancel): From 84c34c78698e021b2a5246e78112df58096857c4 Mon Sep 17 00:00:00 2001 From: yunyaomingzheng <35861629+yunyaomingzheng@users.noreply.github.com> Date: Fri, 17 Dec 2021 09:13:10 +0800 Subject: [PATCH 2/2] flake8 fixed --- hummingbot/connector/exchange/mexc/mexc_exchange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hummingbot/connector/exchange/mexc/mexc_exchange.py b/hummingbot/connector/exchange/mexc/mexc_exchange.py index 9cf76ad2a79..60018e286a0 100644 --- a/hummingbot/connector/exchange/mexc/mexc_exchange.py +++ b/hummingbot/connector/exchange/mexc/mexc_exchange.py @@ -875,7 +875,7 @@ async def cancel_all(self, timeout_seconds: float) -> List[CancellationResult]: self.logger().network( f"Failed to cancel all orders: {this_turn_cancel_order_ids}" + repr(ex), exc_info=True, - app_warning_msg=f"Failed to cancel all orders on Mexc. Check API key and network connection." + app_warning_msg="Failed to cancel all orders on Mexc. Check API key and network connection." ) return cancellation_results