From ecc83086c04a568b74ff1c4b36fdfc405a3f35a8 Mon Sep 17 00:00:00 2001 From: Richard Frank Date: Sat, 11 Jul 2020 11:02:25 -0400 Subject: [PATCH] STY: Fix flake8 error --- pyfolio/timeseries.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyfolio/timeseries.py b/pyfolio/timeseries.py index b756c89b..2b34d3b7 100644 --- a/pyfolio/timeseries.py +++ b/pyfolio/timeseries.py @@ -963,7 +963,9 @@ def get_top_drawdowns(returns, top=10): underwater = underwater.loc[:peak] drawdowns.append((peak, valley, recovery)) - if (len(returns) == 0) or (len(underwater) == 0) or (np.min(underwater) == 0): + if ((len(returns) == 0) + or (len(underwater) == 0) + or (np.min(underwater) == 0)): break return drawdowns