Use isinstance() instead of type()

Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
This commit is contained in:
Sergey Golitsynskiy
2020-12-17 09:52:03 -05:00
committed by GitHub
co-authored by Nicola Soranzo
parent 8b921fc87d
commit 85d0a09f47
+1 -1
View File
@@ -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)