Improve readability as per code review

This commit is contained in:
Sergey Golitsynskiy
2020-12-17 10:03:55 -05:00
parent 85d0a09f47
commit 07784b70cd
+3 -2
View File
@@ -275,10 +275,11 @@ 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`
f = type_converters[datatype]
if isinstance(value, list):
return [type_converters[datatype](item) for item in value]
return [f(item) for item in value]
else:
return type_converters[datatype](value)
return f(value)
return value
def strip_deprecated_dir(key, value):