From 17e028cf689f7c7f0fe573938493ff07306df0f6 Mon Sep 17 00:00:00 2001 From: Luca Di Grazia Date: Tue, 23 Aug 2022 10:03:34 +0200 Subject: [PATCH] runmode has type `freqtrade.enums.runmode.RunMode` but is used as type `None` "filename": "freqtrade/configuration/configuration.py" "warning_type": "Incompatible variable type [9]", "warning_message": " runmode is declared to have type `freqtrade.enums.runmode.RunMode` but is used as type `None`.", "warning_line": 31 "fix: Add Optional type --- freqtrade/configuration/configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/configuration/configuration.py b/freqtrade/configuration/configuration.py index 0db585acc..13fbbfc52 100644 --- a/freqtrade/configuration/configuration.py +++ b/freqtrade/configuration/configuration.py @@ -28,7 +28,7 @@ class Configuration: Reuse this class for the bot, backtesting, hyperopt and every script that required configuration """ - def __init__(self, args: Dict[str, Any], runmode: RunMode = None) -> None: + def __init__(self, args: Dict[str, Any], runmode: Optional[RunMode] = None) -> None: self.args = args self.config: Optional[Dict[str, Any]] = None self.runmode = runmode