davidhalter / jedi-vim

Using the jedi autocompletion library for VIM.
MIT License
5.27k stars 370 forks source link

Fix added_sys_path default setting #1072

Closed ThomasBlauth closed 2 years ago

ThomasBlauth commented 2 years ago

I think I found a small bug in the default settings. The default setting for added_sys_path is sting quoted twice which leads to the value of g:jedi#added_sys_path beeing the string "[]" instead of an empty list.

Executing python3 print(jedi_vim.get_project().added_sys_path) returns ['[', ']'] instead of an empty list.

A results, for example, is that :checkhealth crashes when g:jedi#added_sys_path is actually set.

:let g:jedi#added_sys_path = ["../test"]

:checkhealth

 health#jedi#check
========================================================================
  - ERROR: Failed to run healthcheck for "jedi" plugin. Exception:
    function health#check[21]..health#jedi#check[2]..jedi#debug_info, line 64
    Vim(if):E691: Can only compare List with List

I'm not too familiar with vimscript, I hope my assumtions are actually true and not a misunderstanding on my part!

davidhalter commented 2 years ago

Yes, this makes sense. Thanks for finding it! There's an issue with the CI though (the string should probably be '[]' instead of "[]").

davidhalter commented 2 years ago

Thanks! (There's something wrong with the coverage CI, but that seems to have nothing to do with this PR.)