From patchwork Tue May 12 00:03:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3773 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7459D60DF9 for ; Tue, 12 May 2020 02:03:46 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="pNAU1OaQ"; dkim-atps=neutral Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7510A120C; Tue, 12 May 2020 02:03:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1589241825; bh=MxoezXKaj0RqpeUNTZK99ziqfV4jkAWx+EoWQz+B/dk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pNAU1OaQHdW7Ja2TwXAUo9bfvIvIqLlyCCucRtIkRkcxwXun7Q+jIrooHWCO+l4sK 28RbDSu6x0Puo1wjaQbIQaDdnmIPGA8eFr8tXeTYNJ9X+1tqtNBgAvfhZVLrQA+MLl ysWXfdn5ADkb4OOHFcE2qOxc5xeVZlvvvNfBnevU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 12 May 2020 03:03:17 +0300 Message-Id: <20200512000322.11753-20-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512000322.11753-1-laurent.pinchart@ideasonboard.com> References: <20200512000322.11753-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 19/24] utils: raspberrypi: ctt: Fix pycodestyle E721 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 00:03:46 -0000 E721 do not compare types, use 'isinstance()' Signed-off-by: Laurent Pinchart --- utils/raspberrypi/ctt/ctt_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/raspberrypi/ctt/ctt_tools.py b/utils/raspberrypi/ctt/ctt_tools.py index f4b9baac5521..3a2fb4af95c5 100644 --- a/utils/raspberrypi/ctt/ctt_tools.py +++ b/utils/raspberrypi/ctt/ctt_tools.py @@ -36,10 +36,10 @@ def get_config(dictt, key, default, ttype): if 'float' not in str(type(val)): raise ValueError elif ttype == 'dict': - if type(val) != type(dictt): + if not isinstance(val, dict): raise ValueError elif ttype == 'list': - if type(val) != type([]): + if not isinstance(val, list): raise ValueError elif ttype == 'bool': ttype = int(bool(ttype))