Skip to content

Commit 70d9ac0

Browse files
authored
Merge pull request freqtrade#11230 from freqtrade/dependabot/pip/develop/ruff-0.9.1
chore(deps-dev): bump ruff from 0.8.6 to 0.9.1
2 parents 5b555cc + be2907a commit 70d9ac0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+71
-90
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ repos:
3131

3232
- repo: https://github.com/charliermarsh/ruff-pre-commit
3333
# Ruff version.
34-
rev: 'v0.8.6'
34+
rev: 'v0.9.1'
3535
hooks:
3636
- id: ruff
3737
- id: ruff-format

freqtrade/commands/cli_options.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def __init__(self, *args, **kwargs):
334334
help="Specify the class name of the hyperopt loss function class (IHyperOptLoss). "
335335
"Different functions can generate completely different results, "
336336
"since the target for optimization is different. Built-in Hyperopt-loss-functions are: "
337-
f'{", ".join(HYPEROPT_LOSS_BUILTIN)}',
337+
f"{', '.join(HYPEROPT_LOSS_BUILTIN)}",
338338
metavar="NAME",
339339
),
340340
"hyperoptexportfilename": Arg(
@@ -663,8 +663,7 @@ def __init__(self, *args, **kwargs):
663663
"--ignore-missing-spaces",
664664
"--ignore-unparameterized-spaces",
665665
help=(
666-
"Suppress errors for any requested Hyperopt spaces "
667-
"that do not contain any parameters."
666+
"Suppress errors for any requested Hyperopt spaces that do not contain any parameters."
668667
),
669668
action="store_true",
670669
),

freqtrade/commands/data_commands.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
def _check_data_config_download_sanity(config: Config) -> None:
1616
if "days" in config and "timerange" in config:
1717
raise ConfigurationError(
18-
"--days and --timerange are mutually exclusive. "
19-
"You can only specify one or the other."
18+
"--days and --timerange are mutually exclusive. You can only specify one or the other."
2019
)
2120

2221
if "pairs" not in config:

freqtrade/data/history/history_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ def _download_pair_history(
259259
logger.info(
260260
f'Download history data for "{pair}", {timeframe}, '
261261
f"{candle_type} and store in {datadir}. "
262-
f'From {format_ms_time(since_ms) if since_ms else "start"} to '
263-
f'{format_ms_time(until_ms) if until_ms else "now"}'
262+
f"From {format_ms_time(since_ms) if since_ms else 'start'} to "
263+
f"{format_ms_time(until_ms) if until_ms else 'now'}"
264264
)
265265

266266
logger.debug(

freqtrade/exchange/check_exchange.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,29 @@ def check_exchange(config: Config, check_for_bad: bool = True) -> bool:
3636
f"This command requires a configured exchange. You should either use "
3737
f"`--exchange <exchange_name>` or specify a configuration file via `--config`.\n"
3838
f"The following exchanges are available for Freqtrade: "
39-
f'{", ".join(available_exchanges())}'
39+
f"{', '.join(available_exchanges())}"
4040
)
4141

4242
if not is_exchange_known_ccxt(exchange):
4343
raise OperationalException(
4444
f'Exchange "{exchange}" is not known to the ccxt library '
4545
f"and therefore not available for the bot.\n"
4646
f"The following exchanges are available for Freqtrade: "
47-
f'{", ".join(available_exchanges())}'
47+
f"{', '.join(available_exchanges())}"
4848
)
4949

5050
valid, reason, _ = validate_exchange(exchange)
5151
if not valid:
5252
if check_for_bad:
5353
raise OperationalException(
54-
f'Exchange "{exchange}" will not work with Freqtrade. ' f"Reason: {reason}"
54+
f'Exchange "{exchange}" will not work with Freqtrade. Reason: {reason}'
5555
)
5656
else:
5757
logger.warning(f'Exchange "{exchange}" will not work with Freqtrade. Reason: {reason}')
5858

5959
if MAP_EXCHANGE_CHILDCLASS.get(exchange, exchange) in SUPPORTED_EXCHANGES:
6060
logger.info(
61-
f'Exchange "{exchange}" is officially supported ' f"by the Freqtrade development team."
61+
f'Exchange "{exchange}" is officially supported by the Freqtrade development team.'
6262
)
6363
else:
6464
logger.warning(

freqtrade/exchange/exchange.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3004,8 +3004,7 @@ async def _async_get_trade_history_id(
30043004
trades.extend(t[x])
30053005
if from_id == from_id_next or t[-1][0] > until:
30063006
logger.debug(
3007-
f"Stopping because from_id did not change. "
3008-
f"Reached {t[-1][0]} > {until}"
3007+
f"Stopping because from_id did not change. Reached {t[-1][0]} > {until}"
30093008
)
30103009
# Reached the end of the defined-download period - add last trade as well.
30113010
if has_overlap:

freqtrade/freqai/RL/BaseReinforcementLearningModel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ def train(self, unfiltered_df: DataFrame, pair: str, dk: FreqaiDataKitchen, **kw
138138
)
139139

140140
logger.info(
141-
f'Training model on {len(dk.data_dictionary["train_features"].columns)}'
142-
f' features and {len(dd["train_features"])} data points'
141+
f"Training model on {len(dk.data_dictionary['train_features'].columns)}"
142+
f" features and {len(dd['train_features'])} data points"
143143
)
144144

145145
self.set_train_and_eval_environments(dd, prices_train, prices_test, dk)
@@ -346,8 +346,7 @@ def build_ohlc_price_dataframes(
346346
)
347347
elif prices_train.empty:
348348
raise OperationalException(
349-
"No prices found, please follow log warning "
350-
"instructions to correct the strategy."
349+
"No prices found, please follow log warning instructions to correct the strategy."
351350
)
352351

353352
prices_train.rename(columns=rename_dict, inplace=True)

freqtrade/freqai/base_models/FreqaiMultiOutputClassifier.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ def fit(self, X, y, sample_weight=None, fit_params=None):
4343

4444
if y.ndim == 1:
4545
raise ValueError(
46-
"y must have at least two dimensions for "
47-
"multi-output regression but has only one."
46+
"y must have at least two dimensions for multi-output regression but has only one."
4847
)
4948

5049
if sample_weight is not None and not has_fit_parameter(self.estimator, "sample_weight"):

freqtrade/freqai/base_models/FreqaiMultiOutputRegressor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ def fit(self, X, y, sample_weight=None, fit_params=None):
3535

3636
if y.ndim == 1:
3737
raise ValueError(
38-
"y must have at least two dimensions for "
39-
"multi-output regression but has only one."
38+
"y must have at least two dimensions for multi-output regression but has only one."
4039
)
4140

4241
if sample_weight is not None and not has_fit_parameter(self.estimator, "sample_weight"):

freqtrade/freqai/freqai_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def start_live(
426426
# append the historic data once per round
427427
if self.dd.historic_data:
428428
self.dd.update_historic_data(strategy, dk)
429-
logger.debug(f'Updating historic data on pair {metadata["pair"]}')
429+
logger.debug(f"Updating historic data on pair {metadata['pair']}")
430430
self.track_current_candle()
431431

432432
(_, new_trained_timerange, data_load_timerange) = dk.check_if_new_training_required(

0 commit comments

Comments
 (0)