chore: Explicitly type variable

This commit is contained in:
Matthias
2025-07-13 10:33:43 +02:00
parent f889061b95
commit bc019d6b6d
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ from freqtrade.exchange.common import (
SUPPORTED_EXCHANGES, SUPPORTED_EXCHANGES,
) )
from freqtrade.exchange.exchange_utils_timeframe import timeframe_to_minutes, timeframe_to_prev_date 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 from freqtrade.util import FtPrecise
@@ -110,7 +110,7 @@ def _build_exchange_list_entry(
"trade_modes": [{"trading_mode": "spot", "margin_mode": ""}], "trade_modes": [{"trading_mode": "spot", "margin_mode": ""}],
} }
if resolved := exchangeClasses.get(mapped_exchange_name): if resolved := exchangeClasses.get(mapped_exchange_name):
supported_modes = [ supported_modes: list[TradeModeType] = [
{"trading_mode": tm.value, "margin_mode": mm.value} {"trading_mode": tm.value, "margin_mode": mm.value}
for tm, mm in resolved["class"]._supported_trading_mode_margin_pairs for tm, mm in resolved["class"]._supported_trading_mode_margin_pairs
] ]
+1 -1
View File
@@ -8,4 +8,4 @@ from freqtrade.ft_types.backtest_result_type import (
get_BacktestResultType_default, get_BacktestResultType_default,
) )
from freqtrade.ft_types.plot_annotation_type import AnnotationType 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