From aab5c5b311b47128a62b32500cb7fab7e3ba485f Mon Sep 17 00:00:00 2001 From: shubhendra Date: Sat, 6 Mar 2021 13:01:05 +0530 Subject: [PATCH] Refactor the comparison involving `not` Signed-off-by: shubhendra --- qlib/contrib/online/operator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qlib/contrib/online/operator.py b/qlib/contrib/online/operator.py index c8b44f578..d2307dad5 100644 --- a/qlib/contrib/online/operator.py +++ b/qlib/contrib/online/operator.py @@ -148,7 +148,7 @@ class Operator: for user_id, user in um.users.items(): dates, trade_exchange = prepare(um, trade_date, user_id, exchange_config) executor = SimulatorExecutor(trade_exchange=trade_exchange) - if not str(dates[0].date()) == str(pred_date.date()): + if str(dates[0].date()) != str(pred_date.date()): raise ValueError( "The account data is not newest! last trading date {}, today {}".format( dates[0].date(), trade_date.date()