remove unused imports
This commit is contained in:
parent
e934d3ddfb
commit
786ddc6a91
@ -23,7 +23,6 @@ from pandas import DataFrame
|
|||||||
from freqtrade.constants import DATETIME_PRINT_FORMAT, LAST_BT_RESULT_FN
|
from freqtrade.constants import DATETIME_PRINT_FORMAT, LAST_BT_RESULT_FN
|
||||||
from freqtrade.data.converter import trim_dataframe
|
from freqtrade.data.converter import trim_dataframe
|
||||||
from freqtrade.data.history import get_timerange
|
from freqtrade.data.history import get_timerange
|
||||||
from freqtrade.exceptions import OperationalException
|
|
||||||
from freqtrade.misc import file_dump_json, plural
|
from freqtrade.misc import file_dump_json, plural
|
||||||
from freqtrade.optimize.backtesting import Backtesting
|
from freqtrade.optimize.backtesting import Backtesting
|
||||||
# Import IHyperOpt and IHyperOptLoss to allow unpickling classes from these modules
|
# Import IHyperOpt and IHyperOptLoss to allow unpickling classes from these modules
|
||||||
|
@ -7,6 +7,8 @@ from contextlib import suppress
|
|||||||
from typing import Any, Callable, Dict, List
|
from typing import Any, Callable, Dict, List
|
||||||
|
|
||||||
from pandas import DataFrame
|
from pandas import DataFrame
|
||||||
|
|
||||||
|
|
||||||
with suppress(ImportError):
|
with suppress(ImportError):
|
||||||
from skopt.space import Dimension
|
from skopt.space import Dimension
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ from freqtrade.exchange import timeframe_to_minutes
|
|||||||
from freqtrade.misc import round_dict
|
from freqtrade.misc import round_dict
|
||||||
from freqtrade.strategy import IStrategy
|
from freqtrade.strategy import IStrategy
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# flake8: noqa: F401
|
# flake8: noqa: F401
|
||||||
from freqtrade.exchange import (timeframe_to_minutes, timeframe_to_msecs, timeframe_to_next_date,
|
from freqtrade.exchange import (timeframe_to_minutes, timeframe_to_msecs, timeframe_to_next_date,
|
||||||
timeframe_to_prev_date, timeframe_to_seconds)
|
timeframe_to_prev_date, timeframe_to_seconds)
|
||||||
|
from freqtrade.strategy.hyper import CategoricalParameter, FloatParameter, IntParameter
|
||||||
from freqtrade.strategy.interface import IStrategy
|
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
|
from freqtrade.strategy.strategy_helper import merge_informative_pair, stoploss_from_open
|
||||||
|
@ -4,7 +4,8 @@ This module defines a base class for auto-hyperoptable strategies.
|
|||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
from contextlib import suppress
|
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):
|
with suppress(ImportError):
|
||||||
from skopt.space import Integer, Real, Categorical
|
from skopt.space import Integer, Real, Categorical
|
||||||
@ -58,12 +59,12 @@ class IntParameter(BaseParameter):
|
|||||||
space: Optional[str] = None, enabled: bool = True, **kwargs):
|
space: Optional[str] = None, enabled: bool = True, **kwargs):
|
||||||
"""
|
"""
|
||||||
Initialize hyperopt-optimizable parameter.
|
Initialize hyperopt-optimizable parameter.
|
||||||
:param low: lower end of optimization space or [low, high].
|
:param low: Lower end (inclusive) of optimization space or [low, high].
|
||||||
:param high: high end of optimization space. Must be none of entire range is passed first parameter.
|
:param high: Upper end (inclusive) of optimization space.
|
||||||
|
Must be none of entire range is passed first parameter.
|
||||||
:param default: A default value.
|
:param default: A default value.
|
||||||
:param space: A parameter category. Can be 'buy' or 'sell'. This parameter is optional if
|
:param space: A parameter category. Can be 'buy' or 'sell'. This parameter is optional if
|
||||||
parameter field
|
parameter fieldname is prefixed with 'buy_' or 'sell_'.
|
||||||
name is prefixed with 'buy_' or 'sell_'.
|
|
||||||
:param kwargs: Extra parameters to skopt.space.Integer.
|
:param kwargs: Extra parameters to skopt.space.Integer.
|
||||||
"""
|
"""
|
||||||
if high is None:
|
if high is None:
|
||||||
@ -92,12 +93,12 @@ class FloatParameter(BaseParameter):
|
|||||||
default: float, space: Optional[str] = None, enabled: bool = True, **kwargs):
|
default: float, space: Optional[str] = None, enabled: bool = True, **kwargs):
|
||||||
"""
|
"""
|
||||||
Initialize hyperopt-optimizable parameter.
|
Initialize hyperopt-optimizable parameter.
|
||||||
:param low: lower end of optimization space or [low, high].
|
:param low: Lower end (inclusive) of optimization space or [low, high].
|
||||||
:param high: high end of optimization space. Must be none of entire range is passed first parameter.
|
:param high: Upper end (inclusive) of optimization space.
|
||||||
|
Must be none if entire range is passed first parameter.
|
||||||
:param default: A default value.
|
:param default: A default value.
|
||||||
:param space: A parameter category. Can be 'buy' or 'sell'. This parameter is optional if
|
:param space: A parameter category. Can be 'buy' or 'sell'. This parameter is optional if
|
||||||
parameter field
|
parameter fieldname is prefixed with 'buy_' or 'sell_'.
|
||||||
name is prefixed with 'buy_' or 'sell_'.
|
|
||||||
:param kwargs: Extra parameters to skopt.space.Real.
|
:param kwargs: Extra parameters to skopt.space.Real.
|
||||||
"""
|
"""
|
||||||
if high is None:
|
if high is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user