Skip to content

Commit

Permalink
BugFix: ValueError
Browse files Browse the repository at this point in the history
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!"
  • Loading branch information
CheloVek0116 authored Jul 24, 2020
1 parent 9794a4a commit 05d709d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ftplugin/python_vimisort.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 05d709d

Please sign in to comment.