From 628983d123763b84c1ccab0c8839afebb9cb341c Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 4 Oct 2024 07:08:56 +0200 Subject: [PATCH] chore: update ft_client to modern typing syntax --- ft_client/freqtrade_client/ft_client.py | 4 ++-- ft_client/freqtrade_client/ft_rest_client.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ft_client/freqtrade_client/ft_client.py b/ft_client/freqtrade_client/ft_client.py index 3c450d1df..13bcbc2b9 100644 --- a/ft_client/freqtrade_client/ft_client.py +++ b/ft_client/freqtrade_client/ft_client.py @@ -5,7 +5,7 @@ import logging import re import sys from pathlib import Path -from typing import Any, Dict +from typing import Any import rapidjson @@ -81,7 +81,7 @@ def print_commands(): print(f"{x}\n\t{doc}\n") -def main_exec(parsed: Dict[str, Any]): +def main_exec(parsed: dict[str, Any]): if parsed.get("show"): print_commands() sys.exit() diff --git a/ft_client/freqtrade_client/ft_rest_client.py b/ft_client/freqtrade_client/ft_rest_client.py index f7c895901..f8f5614ec 100755 --- a/ft_client/freqtrade_client/ft_rest_client.py +++ b/ft_client/freqtrade_client/ft_rest_client.py @@ -7,7 +7,7 @@ so it can be used as a standalone script, and can be installed independently. import json import logging -from typing import Any, Dict, List, Optional, Union +from typing import Any, Optional, Union from urllib.parse import urlencode, urlparse, urlunparse import requests @@ -16,8 +16,8 @@ from requests.exceptions import ConnectionError logger = logging.getLogger("ft_rest_client") -ParamsT = Optional[Dict[str, Any]] -PostDataT = Optional[Union[Dict[str, Any], List[Dict[str, Any]]]] +ParamsT = Optional[dict[str, Any]] +PostDataT = Optional[Union[dict[str, Any], list[dict[str, Any]]]] class FtRestClient: