From c5ed876c090f2e181bd19ecf02448b98a4e02a14 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 4 Oct 2024 06:50:53 +0200 Subject: [PATCH] chore: update types config to modern typing syntax --- freqtrade/ft_types/backtest_result_type.py | 8 ++++---- freqtrade/ft_types/valid_exchanges_type.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/freqtrade/ft_types/backtest_result_type.py b/freqtrade/ft_types/backtest_result_type.py index cad956597..25a890349 100644 --- a/freqtrade/ft_types/backtest_result_type.py +++ b/freqtrade/ft_types/backtest_result_type.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Optional +from typing import Any, Optional from typing_extensions import TypedDict @@ -9,9 +9,9 @@ class BacktestMetadataType(TypedDict): class BacktestResultType(TypedDict): - metadata: Dict[str, Any] # BacktestMetadataType - strategy: Dict[str, Any] - strategy_comparison: List[Any] + metadata: dict[str, Any] # BacktestMetadataType + strategy: dict[str, Any] + strategy_comparison: list[Any] def get_BacktestResultType_default() -> BacktestResultType: diff --git a/freqtrade/ft_types/valid_exchanges_type.py b/freqtrade/ft_types/valid_exchanges_type.py index 497ff8a93..89a06ba40 100644 --- a/freqtrade/ft_types/valid_exchanges_type.py +++ b/freqtrade/ft_types/valid_exchanges_type.py @@ -1,5 +1,5 @@ # Used for list-exchanges -from typing import List, Optional +from typing import Optional from typing_extensions import TypedDict @@ -18,4 +18,4 @@ class ValidExchangesType(TypedDict): dex: bool is_alias: bool alias_for: Optional[str] - trade_modes: List[TradeModeType] + trade_modes: list[TradeModeType]