From 9f30dba6c0a62f5242ad412d4f290ba28485af0d Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 20 Oct 2022 09:16:01 +0200 Subject: [PATCH] Use ==/!= to compare constant literals (str, bytes, int, float, tuple) Identity is different than equality in Python. --- tests/benchmark/benchmark_linear.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/benchmark/benchmark_linear.py b/tests/benchmark/benchmark_linear.py index 55240496235c..cb51417140f7 100644 --- a/tests/benchmark/benchmark_linear.py +++ b/tests/benchmark/benchmark_linear.py @@ -43,7 +43,7 @@ def run_benchmark(args): dtrain.save_binary('dtrain.dm') param = {'objective': 'binary:logistic','booster':'gblinear'} - if args.params is not '': + if args.params != '': param.update(ast.literal_eval(args.params)) param['updater'] = args.updater