From ce3efa8f00aac5fe7c733271cdcf3c27e0ab0d09 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 19 Mar 2023 18:05:08 +0100 Subject: [PATCH] Remove pointless asserts --- freqtrade/optimize/backtesting.py | 4 ---- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 5e1e9b48a..315b3b9db 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -442,10 +442,6 @@ class Backtesting: # Worst case: price ticks tiny bit above open and dives down. stop_rate = row[OPEN_IDX] * (1 - side_1 * abs( (trade.stop_loss_pct or 0.0) / leverage)) - if is_short: - assert stop_rate > row[LOW_IDX] - else: - assert stop_rate < row[HIGH_IDX] # Limit lower-end to candle low to avoid exits below the low. # This still remains "worst case" - but "worst realistic case". diff --git a/pyproject.toml b/pyproject.toml index 81ab50d40..c3ca9e1b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ target-version = "py38" extend-select = [ "C90", # mccabe # "N", # pep8-naming - "UP", # pyupgrade + "UP", # pyupgrade "TID", # flake8-tidy-imports # "EXE", # flake8-executable "YTT", # flake8-2020