From 4924717276a48ed9b1e36bee8d48d50649dba02f Mon Sep 17 00:00:00 2001 From: "wangwenxi.handsome" Date: Mon, 26 Jul 2021 11:25:14 +0000 Subject: [PATCH] fix black --- qlib/backtest/report.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qlib/backtest/report.py b/qlib/backtest/report.py index 6bc7cc3794..95048ba848 100644 --- a/qlib/backtest/report.py +++ b/qlib/backtest/report.py @@ -358,12 +358,12 @@ def _get_base_vol_pri( agg = pa_config.get("agg", "twap").lower() price = pa_config.get("price", "deal_price").lower() - if(decision.trade_range is not None): - if(isinstance(decision.trade_range, IdxTradeRange)): + if decision.trade_range is not None: + if isinstance(decision.trade_range, IdxTradeRange): raise TypeError(f"IdxTradeRange is not supported") trade_start_time, trade_end_time = decision.trade_range.clip_time_range( start_time=trade_start_time, end_time=trade_end_time - ) + ) if price == "deal_price": price_s = trade_exchange.get_deal_price(