[SQUASH] Use HyperStrategyMixin as part of IStrategy interface.

This commit is contained in:
Rokas Kupstys
2021-03-24 16:03:38 +02:00
parent 2d13e5fd50
commit e9f0babe8a
6 changed files with 6 additions and 24 deletions

View File

@@ -5,14 +5,14 @@ This module defines the interface to apply for hyperopt
import logging
import math
from abc import ABC
from typing import Any, Callable, Dict, List, Union
from typing import Any, Callable, Dict, List
from skopt.space import Categorical, Dimension, Integer, Real
from freqtrade.exceptions import OperationalException
from freqtrade.exchange import timeframe_to_minutes
from freqtrade.misc import round_dict
from freqtrade.strategy import IStrategy, HyperStrategyMixin
from freqtrade.strategy import IStrategy
logger = logging.getLogger(__name__)
@@ -34,7 +34,7 @@ class IHyperOpt(ABC):
"""
ticker_interval: str # DEPRECATED
timeframe: str
strategy: Union[IStrategy, HyperStrategyMixin]
strategy: IStrategy
def __init__(self, config: dict) -> None:
self.config = config