davidhalter / jedi

Awesome autocompletion, static analysis and refactoring library for python
http://jedi.readthedocs.io
Other
5.78k stars 508 forks source link

autocompletion shows signature, but no docstring #1817

Closed jgb closed 2 years ago

jgb commented 2 years ago

Issue

I'm trying to use jedi completion (using c-x c-o) and it seems to work, except it only shows the function signature, and no docstring or other explanation. I'm trying this on very basic methods that are part of the python standard library, like .strip() for strings for example. It shows me that strip() has one optional chars parameter, and that the function returns a string. But it tells me nothing about what this function is supposed to do, like I can see in the screenshot on the jedi-vim repo.

Steps to reproduce

My settings related to jedi and autocomplete:

let g:jedi#popup_on_dot = 0
let g:jedi#show_call_signatures = 0
set completeopt=menuone,longest,preview

When I'm in a python buffer this is the value of omnifunc:

omnifunc=jedi#completions

Output of “:verbose JediDebugInfo”

Jedi-vim debug information

jedi-vim version
Global Python

Using Python version 3 to access Jedi.

Jedi
Jedi environment: <SameEnvironment: 3.9.7 in /usr>
Known environments
Settings
g:jedi#popup_on_dot = 0 (default: 1)
g:jedi#show_call_signatures = 0 (default: 1)

  omnifunc=jedi#completions
    Last set from ~/dotfiles/.vim/plugged/jedi-vim/autoload/jedi.vim line 713
  completeopt=menuone,longest,preview
    Last set from ~/.vimrc line 221

:version


VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 31 2021 15:40:05)
Included patches: 1-3565
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               +cmdline_hist      +ex_extra          +jumplist          +mouse_dec         +perl              +sodium            +textobjects       +windows
+arabic            +cmdline_info      +extra_search      +keymap            +mouse_gpm         +persistent_undo   +sound             +textprop          +writebackup
+autocmd           +comments          -farsi             +lambda            -mouse_jsbterm     +popupwin          +spell             +timers            +X11
+autochdir         +conceal           +file_in_path      +langmap           +mouse_netterm     +postscript        +startuptime       +title             -xfontset
-autoservername    +cryptv            +find_in_path      +libcall           +mouse_sgr         +printer           +statusline        +toolbar           +xim
+balloon_eval      +cscope            +float             +linebreak         -mouse_sysmouse    +profile           -sun_workshop      +user_commands     +xpm
+balloon_eval_term +cursorbind        +folding           +lispindent        +mouse_urxvt       -python            +syntax            +vartabs           +xsmp_interact
+browse            +cursorshape       -footer            +listcmds          +mouse_xterm       +python3           +tag_binary        +vertsplit         +xterm_clipboard
++builtin_terms    +dialog_con_gui    +fork()            +localmap          +multi_byte        +quickfix          -tag_old_static    +virtualedit       -xterm_save
+byte_offset       +diff              +gettext           +lua               +multi_lang        +reltime           -tag_any_white     +visual            
+channel           +digraphs          -hangul_input      +menu              -mzscheme          +rightleft         +tcl               +visualextra       
+cindent           +dnd               +iconv             +mksession         +netbeans_intg     +ruby              +termguicolors     +viminfo           
+clientserver      -ebcdic            +insert_expand     +modify_fname      +num64             +scrollbind        +terminal          +vreplace          
+clipboard         +emacs_tags        +ipv6              +mouse             +packages          +signs             +terminfo          +wildignore        
+cmdline_compl     +eval              +job               +mouseshape        +path_extra        +smartindent       +termresponse      +wildmenu          
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -g -O2 -ffile-prefix-map=/build/vim-Co0v4N/vim-8.2.3565=. -fstack-protector-strong -Wformat -Werror=format-security -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
Linking: gcc -L. -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lcanberra -lsodium -lacl -lattr -lgpm -ldl -L/usr/lib -llua5.2 -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.32/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python3.9/config-3.9-x86_64-linux-gnu -lpython3.9 -lcrypt -lpthread -ldl -lutil -lm -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm -lruby-2.7 -lm -L/usr/lib 

:messages

Messages maintainer: Bram Moolenaar <Bram@vim.org>
"~/quividi/vidicenter/newvidicenter/webservices/backends/legacy.py" 1316L, 48901B
:scriptnames ``` 1: /usr/share/vim/vimrc 2: /usr/share/vim/vim82/debian.vim 3: ~/.vimrc 4: ~/dotfiles/.vim/autoload/plug.vim 5: ~/dotfiles/.vim/filetype.vim 6: ~/dotfiles/.vim/plugged/vim-polyglot/filetype.vim 7: ~/dotfiles/.vim/plugged/vim-polyglot/autoload/polyglot/init.vim 8: /usr/share/vim/vim82/filetype.vim 9: ~/dotfiles/.vim/plugged/vim-fugitive/ftdetect/fugitive.vim 10: ~/dotfiles/.vim/plugged/vim-polyglot/ftdetect/polyglot.vim 11: /usr/share/vim/vim82/menu.vim 12: /usr/share/vim/vim82/autoload/paste.vim 13: ~/dotfiles/.vim/plugged/vim-polyglot/extras/filetype.vim 14: /usr/share/vim/vim82/ftplugin.vim 15: /usr/share/vim/vim82/indent.vim 16: /usr/share/vim/vim82/syntax/syntax.vim 17: /usr/share/vim/vim82/syntax/synload.vim 18: /usr/share/vim/vim82/syntax/syncolor.vim 19: /usr/share/vim/vim82/colors/lists/default.vim 20: ~/dotfiles/.vim/plugged/palenight.vim/colors/palenight.vim 21: ~/dotfiles/.vim/plugged/palenight.vim/autoload/palenight.vim 22: /usr/share/vim/vim82/autoload/netrw_gitignore.vim 23: ~/dotfiles/.vim/plugged/ctrlp.vim/plugin/ctrlp.vim 24: ~/dotfiles/.vim/plugged/ctrlp.vim/autoload/ctrlp/mrufiles.vim 25: ~/dotfiles/.vim/plugged/jedi-vim/plugin/jedi.vim 26: ~/dotfiles/.vim/plugged/ale/plugin/ale.vim 27: ~/dotfiles/.vim/plugged/ale/autoload/ale/balloon.vim 28: ~/dotfiles/.vim/plugged/ale/autoload/ale/code_action.vim 29: ~/dotfiles/.vim/plugged/ale/autoload/ale/events.vim 30: ~/dotfiles/.vim/plugged/vim-startuptime/plugin/startuptime.vim 31: ~/.fzf/plugin/fzf.vim 32: ~/dotfiles/.vim/plugged/fzf.vim/plugin/fzf.vim 33: ~/dotfiles/.vim/plugged/vim-peekaboo/plugin/peekaboo.vim 34: ~/dotfiles/.vim/plugged/traces.vim/plugin/traces.vim 35: ~/dotfiles/.vim/plugged/undotree/plugin/undotree.vim 36: ~/dotfiles/.vim/plugged/vim-signify/plugin/signify.vim 37: ~/dotfiles/.vim/plugged/nerdtree/plugin/NERD_tree.vim 38: ~/dotfiles/.vim/plugged/nerdtree/autoload/nerdtree.vim 39: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/path.vim 40: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/menu_controller.vim 41: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/menu_item.vim 42: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/key_map.vim 43: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/bookmark.vim 44: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/tree_file_node.vim 45: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/tree_dir_node.vim 46: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/opener.vim 47: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/creator.vim 48: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/flag_set.vim 49: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/nerdtree.vim 50: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/ui.vim 51: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/event.vim 52: ~/dotfiles/.vim/plugged/nerdtree/lib/nerdtree/notifier.vim 53: ~/dotfiles/.vim/plugged/nerdtree/autoload/nerdtree/ui_glue.vim 54: ~/dotfiles/.vim/plugged/nerdtree-git-plugin/nerdtree_plugin/git_status.vim 55: ~/dotfiles/.vim/plugged/nerdtree-git-plugin/autoload/gitstatus.vim 56: ~/dotfiles/.vim/plugged/nerdtree-git-plugin/autoload/gitstatus/log.vim 57: ~/dotfiles/.vim/plugged/nerdtree-git-plugin/autoload/gitstatus/listener.vim 58: ~/dotfiles/.vim/plugged/nerdtree/nerdtree_plugin/exec_menuitem.vim 59: ~/dotfiles/.vim/plugged/nerdtree/nerdtree_plugin/fs_menu.vim 60: ~/dotfiles/.vim/plugged/nerdtree/nerdtree_plugin/vcs.vim 61: ~/dotfiles/.vim/plugged/tagbar/plugin/tagbar.vim 62: ~/dotfiles/.vim/plugged/vim-mundo/plugin/mundo.vim 63: ~/dotfiles/.vim/plugged/vim-mundo/autoload/mundo/util.vim 64: ~/dotfiles/.vim/plugged/vim-commentary/plugin/commentary.vim 65: ~/dotfiles/.vim/plugged/vim-fugitive/plugin/fugitive.vim 66: ~/dotfiles/.vim/plugged/vim-rhubarb/plugin/rhubarb.vim 67: ~/dotfiles/.vim/plugged/vim-sensible/plugin/sensible.vim 68: /usr/share/vim/vim82/macros/matchit.vim 69: /usr/share/vim/vim82/pack/dist/opt/matchit/plugin/matchit.vim 70: ~/dotfiles/.vim/plugged/vim-surround/plugin/surround.vim 71: ~/dotfiles/.vim/plugged/vim-unimpaired/plugin/unimpaired.vim 72: ~/dotfiles/.vim/plugged/vim-airline/plugin/airline.vim 73: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/init.vim 74: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/parts.vim 75: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/formatter/short_path.vim 76: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/util.vim 77: ~/dotfiles/.vim/plugged/vim-airline-themes/plugin/airline-themes.vim 78: ~/dotfiles/.vim/plugged/vimwiki/plugin/vimwiki.vim 79: ~/dotfiles/.vim/plugged/vimwiki/autoload/vimwiki/vars.vim 80: ~/dotfiles/.vim/plugged/vimwiki/autoload/vimwiki/u.vim 81: ~/dotfiles/.vim/plugged/neodark.vim/plugin/neodark.vim 82: ~/dotfiles/.vim/plugged/vim-polyglot/plugin/polyglot.vim 83: /usr/share/vim/vim82/plugin/getscriptPlugin.vim 84: /usr/share/vim/vim82/plugin/gzip.vim 85: /usr/share/vim/vim82/plugin/logiPat.vim 86: /usr/share/vim/vim82/plugin/manpager.vim 87: /usr/share/vim/vim82/plugin/matchparen.vim 88: /usr/share/vim/vim82/plugin/netrwPlugin.vim 89: /usr/share/vim/vim82/plugin/rrhelper.vim 90: /usr/share/vim/vim82/plugin/spellfile.vim 91: /usr/share/vim/vim82/plugin/tarPlugin.vim 92: /usr/share/vim/vim82/plugin/tohtml.vim 93: /usr/share/vim/vim82/plugin/vimballPlugin.vim 94: /usr/share/vim/vim82/plugin/zipPlugin.vim 95: ~/dotfiles/.vim/plugged/indentLine/after/plugin/indentLine.vim 96: ~/dotfiles/.vim/plugged/dracula/after/plugin/dracula.vim 97: ~/dotfiles/.vim/plugged/dracula/autoload/dracula.vim 98: /usr/share/vim/gvimrc 99: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions.vim 100: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/quickfix.vim 101: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline.vim 102: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/netrw.vim 103: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/fzf.vim 104: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/term.vim 105: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/section.vim 106: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/highlighter.vim 107: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/ctrlp.vim 108: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/undotree.vim 109: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/hunks.vim 110: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/tagbar.vim 111: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/branch.vim 112: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/fugitiveline.vim 113: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/ale.vim 114: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/whitespace.vim 115: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/wordcount.vim 116: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/tabline.vim 117: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/autoshow.vim 118: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabs.vim 119: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/buffers.vim 120: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/keymap.vim 121: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/searchcount.vim 122: ~/dotfiles/.vim/plugged/vim-mundo/autoload/airline/extensions/mundo.vim 123: ~/dotfiles/.vim/plugged/palenight.vim/autoload/airline/themes/palenight.vim 124: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/themes.vim 125: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/builder.vim 126: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/default.vim 127: ~/dotfiles/.vim/plugged/vim-peekaboo/autoload/peekaboo.vim 128: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/ctrlspace.vim 129: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/tabws.vim 130: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/builder.vim 131: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/buflist.vim 132: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/short_path.vim 133: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/tabline/formatters/default.vim 134: ~/dotfiles/.vim/plugged/vim-signify/autoload/sy.vim 135: ~/dotfiles/.vim/plugged/tagbar/autoload/tagbar.vim 136: ~/dotfiles/.vim/plugged/tagbar/autoload/tagbar/debug.vim 137: ~/dotfiles/.vim/plugged/tagbar/autoload/tagbar/types/uctags.vim 138: ~/dotfiles/.vim/plugged/tagbar/autoload/tagbar/prototypes/typeinfo.vim 139: ~/dotfiles/.vim/plugged/ale/autoload/ale/engine.vim 140: ~/dotfiles/.vim/plugged/ale/autoload/ale/statusline.vim 141: ~/dotfiles/.vim/plugged/traces.vim/autoload/traces.vim 142: ~/dotfiles/.vim/plugged/ctrlp.vim/autoload/ctrlp.vim 143: ~/dotfiles/.vim/plugged/ctrlp.vim/autoload/ctrlp/utils.vim 144: ~/dotfiles/.vim/plugged/ale/autoload/ale/cursor.vim 145: ~/dotfiles/.vim/plugged/ale/autoload/ale.vim 146: ~/dotfiles/.vim/plugged/ale/autoload/ale/util.vim 147: ~/dotfiles/.vim/plugged/jedi-vim/ftplugin/python/jedi.vim 148: ~/dotfiles/.vim/plugged/jedi-vim/autoload/jedi.vim 149: /usr/share/vim/vim82/ftplugin/python.vim 150: ~/dotfiles/.vim/plugged/jedi-vim/after/ftplugin/python/jedi.vim 151: ~/dotfiles/.vim/plugged/vim-polyglot/indent/python.vim 152: /usr/share/vim/vim82/indent/python.vim 153: ~/dotfiles/.vim/plugged/vim-polyglot/syntax/python.vim 154: /usr/share/vim/vim82/syntax/python.vim 155: ~/dotfiles/.vim/plugged/jedi-vim/after/syntax/python.vim 156: ~/dotfiles/.vim/plugged/dracula/after/syntax/python.vim 157: ~/dotfiles/.vim/plugged/tagbar/autoload/tagbar/prototypes/fileinfo.vim 158: ~/dotfiles/.vim/plugged/tagbar/autoload/tagbar/prototypes/normaltag.vim 159: ~/dotfiles/.vim/plugged/tagbar/autoload/tagbar/prototypes/basetag.vim 160: ~/dotfiles/.vim/plugged/tagbar/autoload/tagbar/prototypes/kindheadertag.vim 161: ~/dotfiles/.vim/plugged/tagbar/autoload/tagbar/sorting.vim 162: ~/dotfiles/.vim/plugged/tagbar/autoload/tagbar/state.vim 163: ~/dotfiles/.vim/plugged/vim-signify/autoload/sy/util.vim 164: ~/dotfiles/.vim/plugged/vim-signify/autoload/sy/repo.vim 165: ~/dotfiles/.vim/plugged/vim-fugitive/autoload/fugitive.vim 166: ~/dotfiles/.vim/plugged/vim-airline/autoload/airline/async.vim 167: ~/dotfiles/.vim/plugged/vim-signify/autoload/sy/sign.vim 168: ~/dotfiles/.vim/plugged/vim-signify/autoload/sy/highlight.vim ```
davidhalter commented 2 years ago

WTF. this is actually an issue. I'm still not sure why this happens, but I can reproduce in Jedi as well. Very bad. There are thousands of tests and this is not tested...

Will definitely fix this. Moving to the Jedi issue tracker.

davidhalter commented 2 years ago

Fixed in e580d1f4d909e160ded40403f6efd152459d63ab will be merged soon.

Super dumb bug. Thanks a lot for bringing it up. This should have been known a long time ago.

davidhalter commented 2 years ago

v0.18.1 is released.

jgb commented 2 years ago

@davidhalter excellent, thanks! I assume that you'll update jedi-vim as well to use this newest release of jedi? currently the jedi git submodule in my ~/.vim/plugged/jedi-vim says HEAD detached at 8ef2ce23 not sure why it's that commit in particular and how it gets updated to a newer version?

davidhalter commented 2 years ago

It will be updated whenever you create a pull request against jedi-vim. :) I will be happy to merge. This part usually happens a bit after the release.