From 25e1142f8924f2f91009fb16f0d49d2a0c9b6047 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 8 Dec 2021 15:59:20 +0100 Subject: [PATCH] Update Enum imports --- freqtrade/configuration/configuration.py | 3 +-- tests/conftest.py | 4 +--- tests/data/test_dataprovider.py | 3 +-- tests/data/test_history.py | 2 +- tests/plugins/test_pairlist.py | 3 +-- tests/rpc/test_rpc_apiserver.py | 3 +-- tests/strategy/test_strategy_helpers.py | 2 +- 7 files changed, 7 insertions(+), 13 deletions(-) diff --git a/freqtrade/configuration/configuration.py b/freqtrade/configuration/configuration.py index bac20c054..48bd7bdb3 100644 --- a/freqtrade/configuration/configuration.py +++ b/freqtrade/configuration/configuration.py @@ -13,8 +13,7 @@ from freqtrade.configuration.deprecated_settings import process_temporary_deprec from freqtrade.configuration.directory_operations import create_datadir, create_userdata_dir from freqtrade.configuration.environment_vars import enironment_vars_to_dict from freqtrade.configuration.load_config import load_config_file, load_file -from freqtrade.enums import NON_UTIL_MODES, TRADING_MODES, RunMode -from freqtrade.enums.candletype import CandleType +from freqtrade.enums import NON_UTIL_MODES, TRADING_MODES, CandleType, RunMode from freqtrade.exceptions import OperationalException from freqtrade.loggers import setup_logging from freqtrade.misc import deep_merge_dicts, parse_db_uri_for_logging diff --git a/tests/conftest.py b/tests/conftest.py index e60c441b7..0b625ab68 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -18,9 +18,7 @@ from freqtrade import constants from freqtrade.commands import Arguments from freqtrade.data.converter import ohlcv_to_dataframe from freqtrade.edge import PairInfo -from freqtrade.enums import Collateral, RunMode, TradingMode -from freqtrade.enums.candletype import CandleType -from freqtrade.enums.signaltype import SignalDirection +from freqtrade.enums import CandleType, Collateral, RunMode, SignalDirection, TradingMode from freqtrade.exchange import Exchange from freqtrade.freqtradebot import FreqtradeBot from freqtrade.persistence import LocalTrade, Trade, init_db diff --git a/tests/data/test_dataprovider.py b/tests/data/test_dataprovider.py index 17a90aca4..93f82de5d 100644 --- a/tests/data/test_dataprovider.py +++ b/tests/data/test_dataprovider.py @@ -5,8 +5,7 @@ import pytest from pandas import DataFrame from freqtrade.data.dataprovider import DataProvider -from freqtrade.enums import RunMode -from freqtrade.enums.candletype import CandleType +from freqtrade.enums import CandleType, RunMode from freqtrade.exceptions import ExchangeError, OperationalException from freqtrade.plugins.pairlistmanager import PairListManager from tests.conftest import get_patched_exchange diff --git a/tests/data/test_history.py b/tests/data/test_history.py index 4ec31ccd6..678a0b31b 100644 --- a/tests/data/test_history.py +++ b/tests/data/test_history.py @@ -24,7 +24,7 @@ from freqtrade.data.history.history_utils import (_download_pair_history, _downl validate_backtest_data) from freqtrade.data.history.idatahandler import IDataHandler, get_datahandler, get_datahandlerclass from freqtrade.data.history.jsondatahandler import JsonDataHandler, JsonGzDataHandler -from freqtrade.enums.candletype import CandleType +from freqtrade.enums import CandleType from freqtrade.exchange import timeframe_to_minutes from freqtrade.misc import file_dump_json from freqtrade.resolvers import StrategyResolver diff --git a/tests/plugins/test_pairlist.py b/tests/plugins/test_pairlist.py index 3ef6dacd6..f70f2e388 100644 --- a/tests/plugins/test_pairlist.py +++ b/tests/plugins/test_pairlist.py @@ -7,8 +7,7 @@ import pytest import time_machine from freqtrade.constants import AVAILABLE_PAIRLISTS -from freqtrade.enums.candletype import CandleType -from freqtrade.enums.runmode import RunMode +from freqtrade.enums import CandleType, RunMode from freqtrade.exceptions import OperationalException from freqtrade.persistence import Trade from freqtrade.plugins.pairlist.pairlist_helpers import expand_pairlist diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index 0823c7aee..8d25d1f5f 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -16,8 +16,7 @@ from numpy import isnan from requests.auth import _basic_auth_str from freqtrade.__init__ import __version__ -from freqtrade.enums import RunMode, State -from freqtrade.enums.candletype import CandleType +from freqtrade.enums import CandleType, RunMode, State from freqtrade.exceptions import DependencyException, ExchangeError, OperationalException from freqtrade.loggers import setup_logging, setup_logging_pre from freqtrade.persistence import PairLocks, Trade diff --git a/tests/strategy/test_strategy_helpers.py b/tests/strategy/test_strategy_helpers.py index 8c7da75f5..a1b6f57d5 100644 --- a/tests/strategy/test_strategy_helpers.py +++ b/tests/strategy/test_strategy_helpers.py @@ -5,7 +5,7 @@ import pandas as pd import pytest from freqtrade.data.dataprovider import DataProvider -from freqtrade.enums.candletype import CandleType +from freqtrade.enums import CandleType from freqtrade.strategy import (merge_informative_pair, stoploss_from_absolute, stoploss_from_open, timeframe_to_minutes) from tests.conftest import get_patched_exchange