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:
மனோஜ்குமார் பழனிச்சாமி
2022-05-18 03:27:18 +05:30
parent 7b9439f2e4
commit e7f15fb61f
48 changed files with 191 additions and 194 deletions

View File

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