Fix isort imports

This commit is contained in:
Joe Schr
2024-02-06 20:35:16 +01:00
parent 3ae5667684
commit f61c75ffcc
7 changed files with 28 additions and 25 deletions

View File

@@ -3,7 +3,7 @@
""" """
bot constants bot constants
""" """
from typing import Any, Dict, List, Literal, Tuple, Optional from typing import Any, Dict, List, Literal, Optional, Tuple
from freqtrade.enums import CandleType, PriceType, RPCMessageType from freqtrade.enums import CandleType, PriceType, RPCMessageType

View File

@@ -1,8 +1,10 @@
from freqtrade.data.converter.converter import (clean_duplicate_trades, clean_ohlcv_dataframe, convert_ohlcv_format, from freqtrade.data.converter.converter import (clean_duplicate_trades, clean_ohlcv_dataframe,
ohlcv_fill_up_missing_data, ohlcv_to_dataframe, convert_ohlcv_format, ohlcv_fill_up_missing_data,
order_book_to_dataframe, ohlcv_to_dataframe, order_book_to_dataframe,
populate_dataframe_with_trades, public_trades_to_dataframe, populate_dataframe_with_trades,
reduce_dataframe_footprint, trim_dataframe, trim_dataframes) public_trades_to_dataframe,
reduce_dataframe_footprint, trim_dataframe,
trim_dataframes)
from freqtrade.data.converter.trade_converter import (convert_trades_format, from freqtrade.data.converter.trade_converter import (convert_trades_format,
convert_trades_to_ohlcv, trades_convert_types, convert_trades_to_ohlcv, trades_convert_types,
trades_df_remove_duplicates, trades_df_remove_duplicates,

View File

@@ -1,6 +1,7 @@
""" """
Functions to convert data from one format to another Functions to convert data from one format to another
""" """
import itertools
import logging import logging
import time import time
from typing import Dict from typing import Dict
@@ -8,11 +9,11 @@ from typing import Dict
import numpy as np import numpy as np
import pandas as pd import pandas as pd
from pandas import DataFrame, to_datetime from pandas import DataFrame, to_datetime
import itertools
from freqtrade.constants import DEFAULT_ORDERFLOW_COLUMNS, DEFAULT_TRADES_COLUMNS, DEFAULT_DATAFRAME_COLUMNS, Config from freqtrade.constants import (DEFAULT_DATAFRAME_COLUMNS, DEFAULT_ORDERFLOW_COLUMNS,
from freqtrade.enums import CandleType, TradingMode DEFAULT_TRADES_COLUMNS, Config)
from freqtrade.data.converter.trade_converter import trades_df_remove_duplicates from freqtrade.data.converter.trade_converter import trades_df_remove_duplicates
from freqtrade.enums import CandleType, TradingMode
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@@ -12,10 +12,11 @@ from typing import Any, Dict, List, Optional, Tuple
from pandas import DataFrame, Timedelta, Timestamp, to_timedelta from pandas import DataFrame, Timedelta, Timestamp, to_timedelta
from freqtrade.configuration import TimeRange from freqtrade.configuration import TimeRange
from freqtrade.data.history.idatahandler import get_datahandler
from freqtrade.constants import (FULL_DATAFRAME_THRESHOLD, Config, ListPairsWithTimeframes, from freqtrade.constants import (FULL_DATAFRAME_THRESHOLD, Config, ListPairsWithTimeframes,
PairWithTimeframe, ListTicksWithTimeframes) ListTicksWithTimeframes, PairWithTimeframe)
from freqtrade.data.converter import public_trades_to_dataframe
from freqtrade.data.history import load_pair_history from freqtrade.data.history import load_pair_history
from freqtrade.data.history.idatahandler import get_datahandler
from freqtrade.enums import CandleType, RPCMessageType, RunMode from freqtrade.enums import CandleType, RPCMessageType, RunMode
from freqtrade.exceptions import ExchangeError, OperationalException from freqtrade.exceptions import ExchangeError, OperationalException
from freqtrade.exchange import Exchange, timeframe_to_prev_date, timeframe_to_seconds from freqtrade.exchange import Exchange, timeframe_to_prev_date, timeframe_to_seconds
@@ -25,7 +26,6 @@ from freqtrade.rpc import RPCManager
from freqtrade.rpc.rpc_types import RPCAnalyzedDFMsg from freqtrade.rpc.rpc_types import RPCAnalyzedDFMsg
from freqtrade.util import PeriodicCache from freqtrade.util import PeriodicCache
from freqtrade.data.converter import public_trades_to_dataframe
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@@ -10,7 +10,7 @@ from copy import deepcopy
from datetime import datetime, timedelta, timezone from datetime import datetime, timedelta, timezone
from math import floor from math import floor
from threading import Lock from threading import Lock
from typing import Any, Coroutine, Dict, List, Literal, Optional, Tuple, Union, Callable from typing import Any, Callable, Coroutine, Dict, List, Literal, Optional, Tuple, Union
import ccxt import ccxt
import ccxt.async_support as ccxt_async import ccxt.async_support as ccxt_async
@@ -19,14 +19,15 @@ from ccxt import TICK_SIZE
from dateutil import parser from dateutil import parser
from pandas import DataFrame, concat from pandas import DataFrame, concat
from freqtrade.constants import (DEFAULT_TRADES_COLUMNS, DEFAULT_AMOUNT_RESERVE_PERCENT, NON_OPEN_EXCHANGE_STATES, BidAsk, from freqtrade.constants import (DEFAULT_AMOUNT_RESERVE_PERCENT, DEFAULT_TRADES_COLUMNS,
BuySell, Config, EntryExit, ExchangeConfig, NON_OPEN_EXCHANGE_STATES, BidAsk, BuySell, Config, EntryExit,
ListPairsWithTimeframes, MakerTaker, OBLiteral, PairWithTimeframe) ExchangeConfig, ListPairsWithTimeframes, MakerTaker, OBLiteral,
PairWithTimeframe)
from freqtrade.data.converter import clean_duplicate_trades, clean_ohlcv_dataframe, ohlcv_to_dataframe, trades_dict_to_list, public_trades_to_dataframe from freqtrade.data.converter import (clean_duplicate_trades, clean_ohlcv_dataframe,
ohlcv_to_dataframe, public_trades_to_dataframe,
trades_dict_to_list)
from freqtrade.data.converter.converter import _calculate_ohlcv_candle_start_and_end from freqtrade.data.converter.converter import _calculate_ohlcv_candle_start_and_end
from freqtrade.enums import OPTIMIZE_MODES, CandleType, MarginMode, PriceType, RunMode, TradingMode from freqtrade.enums import OPTIMIZE_MODES, CandleType, MarginMode, PriceType, RunMode, TradingMode
from freqtrade.exceptions import (DDosProtection, ExchangeError, InsufficientFundsError, from freqtrade.exceptions import (DDosProtection, ExchangeError, InsufficientFundsError,
InvalidOrderException, OperationalException, PricingError, InvalidOrderException, OperationalException, PricingError,
RetryableOrderError, TemporaryError) RetryableOrderError, TemporaryError)

View File

@@ -10,12 +10,13 @@ from typing import Dict, List, Optional, Tuple, Union
from pandas import DataFrame from pandas import DataFrame
from freqtrade.constants import CUSTOM_TAG_MAX_LENGTH, Config, IntOrInf, ListPairsWithTimeframes from freqtrade.constants import CUSTOM_TAG_MAX_LENGTH, Config, IntOrInf, ListPairsWithTimeframes
from freqtrade.data import converter
from freqtrade.data.dataprovider import DataProvider from freqtrade.data.dataprovider import DataProvider
from freqtrade.enums import (CandleType, ExitCheckTuple, ExitType, MarketDirection, RunMode, from freqtrade.enums import (CandleType, ExitCheckTuple, ExitType, MarketDirection, RunMode,
SignalDirection, SignalTagType, SignalType, TradingMode) SignalDirection, SignalTagType, SignalType, TradingMode)
from freqtrade.exceptions import OperationalException, StrategyError from freqtrade.exceptions import OperationalException, StrategyError
from freqtrade.exchange import timeframe_to_minutes, timeframe_to_next_date, timeframe_to_seconds, timeframe_to_msecs from freqtrade.exchange import (timeframe_to_minutes, timeframe_to_msecs, timeframe_to_next_date,
from freqtrade.data import converter timeframe_to_seconds)
from freqtrade.misc import remove_entry_exit_signals from freqtrade.misc import remove_entry_exit_signals
from freqtrade.persistence import Order, PairLocks, Trade from freqtrade.persistence import Order, PairLocks, Trade
from freqtrade.strategy.hyper import HyperStrategyMixin from freqtrade.strategy.hyper import HyperStrategyMixin

View File

@@ -9,10 +9,8 @@ from pandas import DataFrame
from freqtrade.configuration import Configuration from freqtrade.configuration import Configuration
from freqtrade.constants import DEFAULT_ORDERFLOW_COLUMNS from freqtrade.constants import DEFAULT_ORDERFLOW_COLUMNS
from freqtrade.data.converter import ( from freqtrade.data.converter import populate_dataframe_with_trades, public_trades_to_dataframe
populate_dataframe_with_trades, public_trades_to_dataframe) from freqtrade.data.converter.converter import trades_to_volumeprofile_with_total_delta_bid_ask
from freqtrade.data.converter.converter import (
trades_to_volumeprofile_with_total_delta_bid_ask)
from freqtrade.enums import CandleType, MarginMode, TradingMode from freqtrade.enums import CandleType, MarginMode, TradingMode
from freqtrade.exchange.exchange import timeframe_to_minutes from freqtrade.exchange.exchange import timeframe_to_minutes