remove unused imports

This commit is contained in:
Matthias 2021-03-27 10:40:48 +01:00
parent e934d3ddfb
commit 786ddc6a91
5 changed files with 14 additions and 11 deletions

View File

@ -23,7 +23,6 @@ from pandas import DataFrame
from freqtrade.constants import DATETIME_PRINT_FORMAT, LAST_BT_RESULT_FN
from freqtrade.data.converter import trim_dataframe
from freqtrade.data.history import get_timerange
from freqtrade.exceptions import OperationalException
from freqtrade.misc import file_dump_json, plural
from freqtrade.optimize.backtesting import Backtesting
# Import IHyperOpt and IHyperOptLoss to allow unpickling classes from these modules

View File

@ -7,6 +7,8 @@ from contextlib import suppress
from typing import Any, Callable, Dict, List
from pandas import DataFrame
with suppress(ImportError):
from skopt.space import Dimension

View File

@ -14,6 +14,7 @@ from freqtrade.exchange import timeframe_to_minutes
from freqtrade.misc import round_dict
from freqtrade.strategy import IStrategy
logger = logging.getLogger(__name__)

View File

@ -1,6 +1,6 @@
# flake8: noqa: F401
from freqtrade.exchange import (timeframe_to_minutes, timeframe_to_msecs, timeframe_to_next_date,
timeframe_to_prev_date, timeframe_to_seconds)
from freqtrade.strategy.hyper import CategoricalParameter, FloatParameter, IntParameter
from freqtrade.strategy.interface import IStrategy
from freqtrade.strategy.hyper import IntParameter, FloatParameter, CategoricalParameter
from freqtrade.strategy.strategy_helper import merge_informative_pair, stoploss_from_open

View File

@ -4,7 +4,8 @@ This module defines a base class for auto-hyperoptable strategies.
"""
import logging
from contextlib import suppress
from typing import Iterator, Tuple, Any, Optional, Sequence, Union
from typing import Any, Iterator, Optional, Sequence, Tuple, Union
with suppress(ImportError):
from skopt.space import Integer, Real, Categorical
@ -58,12 +59,12 @@ class IntParameter(BaseParameter):
space: Optional[str] = None, enabled: bool = True, **kwargs):
"""
Initialize hyperopt-optimizable parameter.
:param low: lower end of optimization space or [low, high].
:param high: high end of optimization space. Must be none of entire range is passed first parameter.
:param low: Lower end (inclusive) of optimization space or [low, high].
:param high: Upper end (inclusive) of optimization space.
Must be none of entire range is passed first parameter.
:param default: A default value.
:param space: A parameter category. Can be 'buy' or 'sell'. This parameter is optional if
parameter field
name is prefixed with 'buy_' or 'sell_'.
parameter fieldname is prefixed with 'buy_' or 'sell_'.
:param kwargs: Extra parameters to skopt.space.Integer.
"""
if high is None:
@ -92,12 +93,12 @@ class FloatParameter(BaseParameter):
default: float, space: Optional[str] = None, enabled: bool = True, **kwargs):
"""
Initialize hyperopt-optimizable parameter.
:param low: lower end of optimization space or [low, high].
:param high: high end of optimization space. Must be none of entire range is passed first parameter.
:param low: Lower end (inclusive) of optimization space or [low, high].
:param high: Upper end (inclusive) of optimization space.
Must be none if entire range is passed first parameter.
:param default: A default value.
:param space: A parameter category. Can be 'buy' or 'sell'. This parameter is optional if
parameter field
name is prefixed with 'buy_' or 'sell_'.
parameter fieldname is prefixed with 'buy_' or 'sell_'.
:param kwargs: Extra parameters to skopt.space.Real.
"""
if high is None: