summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2019-03-23 21:38:01 -0700
committerTimothy Crosley <timothy.crosley@gmail.com>2019-03-23 21:38:01 -0700
commitd3be87ea58b1dab67ae76db5c9980b356f5893e6 (patch)
tree4496e61a28e7f0c8dae244e8fd7dceaba1c59e50
parent6c04efcad926e3fa4837c7e57883948aa03c3b35 (diff)
downloadisort-d3be87ea58b1dab67ae76db5c9980b356f5893e6.tar.gz
Update main.py to take into account the provided settings path (if there is one)
-rw-r--r--isort/main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/isort/main.py b/isort/main.py
index 24de5c0c..8c3ec9a3 100644
--- a/isort/main.py
+++ b/isort/main.py
@@ -345,7 +345,8 @@ def main(argv=None):
arguments['recursive'] = True
if not arguments.get('apply', False):
arguments['ask_to_apply'] = True
- config = from_path(os.path.abspath(file_names[0]) or os.getcwd()).copy()
+
+ config = from_path(arguments.get('settings_path', '') or os.path.abspath(file_names[0]) or os.getcwd()).copy()
config.update(arguments)
wrong_sorted_files = False
skipped = []