From bc019d6b6dd98a5fe3fe7acc840d70706f96e26f Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 13 Jul 2025 10:33:43 +0200 Subject: [PATCH] chore: Explicitly type variable --- freqtrade/exchange/exchange_utils.py | 4 ++-- freqtrade/ft_types/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/exchange/exchange_utils.py b/freqtrade/exchange/exchange_utils.py index 027044393..550aab2c3 100644 --- a/freqtrade/exchange/exchange_utils.py +++ b/freqtrade/exchange/exchange_utils.py @@ -27,7 +27,7 @@ from freqtrade.exchange.common import ( SUPPORTED_EXCHANGES, ) from freqtrade.exchange.exchange_utils_timeframe import timeframe_to_minutes, timeframe_to_prev_date -from freqtrade.ft_types import ValidExchangesType +from freqtrade.ft_types import TradeModeType, ValidExchangesType from freqtrade.util import FtPrecise @@ -110,7 +110,7 @@ def _build_exchange_list_entry( "trade_modes": [{"trading_mode": "spot", "margin_mode": ""}], } if resolved := exchangeClasses.get(mapped_exchange_name): - supported_modes = [ + supported_modes: list[TradeModeType] = [ {"trading_mode": tm.value, "margin_mode": mm.value} for tm, mm in resolved["class"]._supported_trading_mode_margin_pairs ] diff --git a/freqtrade/ft_types/__init__.py b/freqtrade/ft_types/__init__.py index 6cd74f7b2..87e2df4dd 100644 --- a/freqtrade/ft_types/__init__.py +++ b/freqtrade/ft_types/__init__.py @@ -8,4 +8,4 @@ from freqtrade.ft_types.backtest_result_type import ( get_BacktestResultType_default, ) from freqtrade.ft_types.plot_annotation_type import AnnotationType -from freqtrade.ft_types.valid_exchanges_type import ValidExchangesType +from freqtrade.ft_types.valid_exchanges_type import TradeModeType, ValidExchangesType