cleanup ruff and isort errors

This commit is contained in:
Joe Schr
2024-05-14 17:28:07 +02:00
parent 10cbc76482
commit dd432ffbde
2 changed files with 1 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ def _convert_timeframe_to_pandas_frequency(timeframe: str):
def _calculate_ohlcv_candle_start_and_end(df: pd.DataFrame, timeframe: str): def _calculate_ohlcv_candle_start_and_end(df: pd.DataFrame, timeframe: str):
from freqtrade.exchange import timeframe_to_resample_freq, timeframe_to_next_date from freqtrade.exchange import timeframe_to_next_date, timeframe_to_resample_freq
timeframe_frequency = timeframe_to_resample_freq(timeframe) timeframe_frequency = timeframe_to_resample_freq(timeframe)
# calculate ohlcv candle start and end # calculate ohlcv candle start and end

View File

@@ -24,7 +24,6 @@ from freqtrade.constants import (DEFAULT_AMOUNT_RESERVE_PERCENT, DEFAULT_TRADES_
ExchangeConfig, ListPairsWithTimeframes, MakerTaker, OBLiteral, ExchangeConfig, ListPairsWithTimeframes, MakerTaker, OBLiteral,
PairWithTimeframe) PairWithTimeframe)
from freqtrade.data.converter import clean_ohlcv_dataframe, ohlcv_to_dataframe from freqtrade.data.converter import clean_ohlcv_dataframe, ohlcv_to_dataframe
from freqtrade.data.converter.orderflow import _calculate_ohlcv_candle_start_and_end
from freqtrade.data.converter.trade_converter import (trades_df_remove_duplicates, from freqtrade.data.converter.trade_converter import (trades_df_remove_duplicates,
trades_dict_to_list, trades_list_to_df) trades_dict_to_list, trades_list_to_df)
from freqtrade.enums import OPTIMIZE_MODES, CandleType, MarginMode, PriceType, RunMode, TradingMode from freqtrade.enums import OPTIMIZE_MODES, CandleType, MarginMode, PriceType, RunMode, TradingMode
@@ -2325,9 +2324,6 @@ class Exchange:
first_required_candle_date: Optional[int]) -> DataFrame: first_required_candle_date: Optional[int]) -> DataFrame:
# keeping parsed dataframe in cache # keeping parsed dataframe in cache
trades_df = trades_list_to_df(ticks, True) trades_df = trades_list_to_df(ticks, True)
# keeping last candle time as last refreshed time of the pair
if ticks and cache:
idx = -1
if cache: if cache:
if (pair, timeframe, c_type) in self._trades: if (pair, timeframe, c_type) in self._trades: