[libcamera-devel,19/24] utils: raspberrypi: ctt: Fix pycodestyle E721

Message ID 20200512000322.11753-20-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • utils: raspberrypi: ctt: Comply with pycodestyle
Related show

Commit Message

Laurent Pinchart May 12, 2020, 12:03 a.m. UTC
E721 do not compare types, use 'isinstance()'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 utils/raspberrypi/ctt/ctt_tools.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

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))