mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Use isinstance() instead of type()
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
This commit is contained in:
co-authored by
Nicola Soranzo
parent
8b921fc87d
commit
85d0a09f47
@@ -275,7 +275,7 @@ class BaseAppConfiguration:
|
||||
# check for `not None` explicitly (value can be falsy)
|
||||
if value is not None and datatype in type_converters:
|
||||
# convert value or each item in value to type `datatype`
|
||||
if type(value) is list:
|
||||
if isinstance(value, list):
|
||||
return [type_converters[datatype](item) for item in value]
|
||||
else:
|
||||
return type_converters[datatype](value)
|
||||
|
||||
Reference in New Issue
Block a user