From 07784b70cd703122da54e8231a739357014cc6cc Mon Sep 17 00:00:00 2001 From: Sergey Golitsynskiy Date: Thu, 17 Dec 2020 10:03:55 -0500 Subject: [PATCH] Improve readability as per code review --- lib/galaxy/config/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/config/__init__.py b/lib/galaxy/config/__init__.py index ce7f92a9a99..3436d35dfd5 100644 --- a/lib/galaxy/config/__init__.py +++ b/lib/galaxy/config/__init__.py @@ -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):