chore: format according to 2026 styleguide

This commit is contained in:
Matthias
2026-02-10 07:05:06 +01:00
parent 33ba2ad17c
commit eb81c70523
2 changed files with 7 additions and 5 deletions

View File

@@ -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,

View File

@@ -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(