From 31a2285eacaa7ce011a98548809fbe314f4f3c79 Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Mon, 26 Apr 2021 10:42:24 +0300 Subject: [PATCH] Fix mypy complaints. --- freqtrade/strategy/interface.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 9a6901712..503a587ea 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -59,9 +59,9 @@ class SellCheckTuple(object): NamedTuple for Sell type + reason """ sell_type: SellType - sell_reason: Optional[str] + sell_reason: str = '' - def __init__(self, sell_type: SellType, sell_reason: Optional[str] = None): + def __init__(self, sell_type: SellType, sell_reason: str = ''): self.sell_type = sell_type self.sell_reason = sell_reason or sell_type.value @@ -568,7 +568,7 @@ class IStrategy(ABC, HyperStrategyMixin): current_time=date)) sell_signal = SellType.NONE - custom_reason = None + custom_reason = '' if (ask_strategy.get('sell_profit_only', False) and current_profit <= ask_strategy.get('sell_profit_offset', 0)): # sell_profit_only and profit doesn't reach the offset - ignore sell signal