From eb81c7052373ccbbaa70e86bd97b1d3261959366 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 10 Feb 2026 07:05:06 +0100 Subject: [PATCH] chore: format according to 2026 styleguide --- freqtrade/commands/data_commands.py | 2 +- freqtrade/plot/plotting.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/freqtrade/commands/data_commands.py b/freqtrade/commands/data_commands.py index 97f100a45..574e19550 100644 --- a/freqtrade/commands/data_commands.py +++ b/freqtrade/commands/data_commands.py @@ -223,7 +223,7 @@ def start_list_trades_data(args: dict[str, Any]) -> None: end.strftime(DATETIME_PRINT_FORMAT), str(length), ) - for pair, start, end, length in sorted(paircombs1, key=lambda x: (x[0])) + for pair, start, end, length in sorted(paircombs1, key=lambda x: x[0]) ], ("Pair", "Type", "From", "To", "Trades"), summary=title, diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index a27069194..6c6f32ea1 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -261,10 +261,12 @@ def plot_trades(fig, trades: pd.DataFrame) -> make_subplots: if trades is not None and len(trades) > 0: # Create description for exit summarizing the trade trades["desc"] = trades.apply( - lambda row: f"{row['profit_ratio']:.2%}, " - + (f"{row['enter_tag']}, " if row["enter_tag"] is not None else "") - + f"{row['exit_reason']}, " - + f"{row['trade_duration']} min", + lambda row: ( + f"{row['profit_ratio']:.2%}, " + + (f"{row['enter_tag']}, " if row["enter_tag"] is not None else "") + + f"{row['exit_reason']}, " + + f"{row['trade_duration']} min" + ), axis=1, ) trade_entries = go.Scatter(