Fix mypy complaints.
This commit is contained in:
parent
9c21c75cf5
commit
31a2285eac
@ -59,9 +59,9 @@ class SellCheckTuple(object):
|
|||||||
NamedTuple for Sell type + reason
|
NamedTuple for Sell type + reason
|
||||||
"""
|
"""
|
||||||
sell_type: SellType
|
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_type = sell_type
|
||||||
self.sell_reason = sell_reason or sell_type.value
|
self.sell_reason = sell_reason or sell_type.value
|
||||||
|
|
||||||
@ -568,7 +568,7 @@ class IStrategy(ABC, HyperStrategyMixin):
|
|||||||
current_time=date))
|
current_time=date))
|
||||||
|
|
||||||
sell_signal = SellType.NONE
|
sell_signal = SellType.NONE
|
||||||
custom_reason = None
|
custom_reason = ''
|
||||||
if (ask_strategy.get('sell_profit_only', False)
|
if (ask_strategy.get('sell_profit_only', False)
|
||||||
and current_profit <= ask_strategy.get('sell_profit_offset', 0)):
|
and current_profit <= ask_strategy.get('sell_profit_offset', 0)):
|
||||||
# sell_profit_only and profit doesn't reach the offset - ignore sell signal
|
# sell_profit_only and profit doesn't reach the offset - ignore sell signal
|
||||||
|
Loading…
Reference in New Issue
Block a user