utils: raspberrypi: ctt: Fix pycodestyle E721
E721 do not compare types, use 'isinstance()' Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
This commit is contained in:
parent
f8e9810020
commit
5eae909293
1 changed files with 2 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue