chore: improve type safety

This commit is contained in:
Matthias
2024-12-17 20:38:46 +01:00
parent ed2427852b
commit d805ee6f3d

View File

@@ -6,7 +6,7 @@ from fastapi.exceptions import HTTPException
from freqtrade import __version__
from freqtrade.data.history import get_datahandler
from freqtrade.enums import CandleType, TradingMode
from freqtrade.enums import CandleType, State, TradingMode
from freqtrade.exceptions import OperationalException
from freqtrade.rpc import RPC
from freqtrade.rpc.api_server.api_schemas import (
@@ -217,7 +217,7 @@ def edge(rpc: RPC = Depends(get_rpc)):
@router.get("/show_config", response_model=ShowConfig, tags=["info"])
def show_config(rpc: RPC | None = Depends(get_rpc_optional), config=Depends(get_config)):
state = ""
state: State | str = ""
strategy_version = None
if rpc:
state = rpc._freqtrade.state