From f287d0ad2499eacdbe251d9b984c45a1b72522ef Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 17 Feb 2025 20:00:27 +0100 Subject: [PATCH] chore: improve variable naming --- freqtrade/freqtradebot.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index a427b2e72..84731117a 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1376,11 +1376,12 @@ class FreqtradeBot(LoggingMixin): if should_exit.exit_flag: exit_tag1 = exit_tag if should_exit.exit_type == ExitType.EXIT_SIGNAL else None if trade.has_open_orders: - pc = self._exit_reason_cache.get( + if prev_eval := self._exit_reason_cache.get( f"{trade.pair}_{trade.id}_{exit_tag1 or should_exit.exit_reason}", None - ) - if pc: - logger.debug(f"Exit reason already seen this candle, first seen at {pc}") + ): + logger.debug( + f"Exit reason already seen this candle, first seen at {prev_eval}" + ) continue logger.info(