Removed "is not None"
https://stackoverflow.com/users/566644/lauritz-v-thaulow freqtrade\configuration\configuration.py:461 reduced checks freqtrade\persistence\trade_model.py:fee_updated - reduced code
This commit is contained in:
@@ -254,11 +254,11 @@ def plot_trades(fig, trades: pd.DataFrame) -> make_subplots:
|
||||
Add trades to "fig"
|
||||
"""
|
||||
# Trades can be empty
|
||||
if trades is not None and len(trades) > 0:
|
||||
if trades and len(trades) > 0:
|
||||
# Create description for sell 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['enter_tag']}, " if row['enter_tag'] else "") +
|
||||
f"{row['exit_reason']}, " +
|
||||
f"{row['trade_duration']} min",
|
||||
axis=1)
|
||||
|
||||
Reference in New Issue
Block a user