From 05d709d9086be8b344a29d45afe05fbc3a5eb179 Mon Sep 17 00:00:00 2001 From: CheloVek0116 <46561244+CheloVek0116@users.noreply.github.com> Date: Sat, 25 Jul 2020 01:19:35 +1000 Subject: [PATCH] BugFix: ValueError Set the g: vim_isort_config_overrides parameter to vimrc and it crashed with the message: "ValueError: You can either specify custom configuration options using kwargs or passing in a Config object. Not Both!" --- ftplugin/python_vimisort.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ftplugin/python_vimisort.vim b/ftplugin/python_vimisort.vim index 904bca7..328ac61 100644 --- a/ftplugin/python_vimisort.vim +++ b/ftplugin/python_vimisort.vim @@ -89,7 +89,10 @@ def isort(text_range): old_text = old_text.decode('utf-8') if code is not None: - new_text = code(old_text, config=Config(settings_path=os.getcwd()), **config_overrides) + if config_overrides: + new_text = code(old_text, **config_overrides) + else: + new_text = code(old_text, config=Config(settings_path=os.getcwd())) else: new_text = SortImports(file_contents=old_text, **config_overrides).output