diff options
author | Stephen Brown II <stephen.brownii@rackspace.com> | 2019-04-15 08:56:35 -0500 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2019-04-15 20:36:21 -0700 |
commit | a9c7bb3a4afdd1df318929b045b94fc1cc054cdf (patch) | |
tree | 33d4cbb39015547068119da94aacc16fb5d2049a | |
parent | 05c3592dd61af2bce67306097a057f8c7f0a69f2 (diff) | |
download | isort-a9c7bb3a4afdd1df318929b045b94fc1cc054cdf.tar.gz |
Fix list passed from toml settings
-rw-r--r-- | isort/settings.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/isort/settings.py b/isort/settings.py index bdadc711..a69471e8 100644 --- a/isort/settings.py +++ b/isort/settings.py @@ -262,7 +262,10 @@ def _update_with_config_file(file_path, sections, computed_settings): def _as_list(value): - return filter(bool, [item.strip() for item in value.replace('\n', ',').split(',')]) + if not isinstance(value, list): + value = value.replace('\n', ',').split(',') + + return filter(bool, [item.strip() for item in value]) def _abspaths(cwd, values): |