ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.44k stars 2.81k forks source link

Python function detected as module instead of function. #3322

Closed julj closed 5 years ago

julj commented 5 years ago

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your issue:

Thank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.

Issue Details

Python function detected as module instead of function.

image

image

I would expect build_response to be detected as a function and to get its signature in the preview window.

image

Diagnostic data

Output of vim --version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2018 21:31:58) Included patches: 1-1453 Modified by pkg-vim-maintainers@lists.alioth.debian.org Compiled by pkg-vim-maintainers@lists.alioth.debian.org Huge version with GTK3 GUI. Features included (+) or not (-): +acl +farsi +mouse_sgr -tag_any_white +arabic +file_in_path -mouse_sysmouse +tcl +autocmd +find_in_path +mouse_urxvt +termguicolors -autoservername +float +mouse_xterm +terminal +balloon_eval +folding +multi_byte +terminfo +balloon_eval_term -footer +multi_lang +termresponse +browse +fork() -mzscheme +textobjects ++builtin_terms +gettext +netbeans_intg +timers +byte_offset -hangul_input +num64 +title +channel +iconv +packages +toolbar +cindent +insert_expand +path_extra +user_commands +clientserver +job +perl +vertsplit +clipboard +jumplist +persistent_undo +virtualedit +cmdline_compl +keymap +postscript +visual +cmdline_hist +lambda +printer +visualextra +cmdline_info +langmap +profile +viminfo +comments +libcall -python +vreplace +conceal +linebreak +python3 +wildignore +cryptv +lispindent +quickfix +wildmenu +cscope +listcmds +reltime +windows +cursorbind +localmap +rightleft +writebackup +cursorshape +lua -ruby +X11 +dialog_con_gui +menu +scrollbind -xfontset +diff +mksession +signs +xim +digraphs +modify_fname +smartindent +xpm +dnd +mouse +startuptime +xsmp_interact -ebcdic +mouseshape +statusline +xterm_clipboard +emacs_tags +mouse_dec -sun_workshop -xterm_save +eval +mouse_gpm +syntax
+ex_extra -mouse_jsbterm +tag_binary
+extra_search +mouse_netterm +tag_old_static
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/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-NQEcoP/vim-8.0.1453=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-E -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -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 -lnsl -lselinux -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.26/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm

Output of YcmDebugInfo

Printing YouCompleteMe debug information... -- Client logfile: /tmp/ycm_cw6seodl.log -- Server Python interpreter: /usr/bin/python3 -- Server Python version: 3.6.7 -- Server has Clang support compiled in: True -- Clang version: clang version 7.0.0 (tags/RELEASE_700/final) -- Extra configuration file found and loaded -- Extra configuration path: /home/jul/dev/phaunos/.ycm_extra_conf.py -- Python completer debug information: -- Python interpreter: /home/jul/.miniconda3/envs/phaunos/bin/python -- Python path: ['/home/jul/dev/phaunos/backend/phaunos', '/home/jul/.miniconda3/envs/phaunos/lib/python36.zip', '/home/jul/.miniconda3/envs/phaunos/lib/python3.6', '/home/jul/.miniconda3/ envs/phaunos/lib/python3.6/lib-dynload', '/home/jul/.miniconda3/envs/phaunos/lib/python3.6/site-packages'] -- Python version: 3.6.8 -- Jedi version: 0.13.2 -- Parso version: 0.3.1 -- Server running at: http://127.0.0.1:47357 -- Server process ID: 22200 -- Server logfiles: -- /tmp/ycmd_47357_stdout_7_s1l9yp.log -- /tmp/ycmd_47357_stderr_94d_lydb.log

Contents of YCM, ycmd and completion engine logfiles

ycm stderr stdout

OS version, distribution, etc.

Linux orca 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Output of build/install commands

Include link to a gist containing the invocation and entire output of install.py if reporting an installation issue.

bstaletic commented 5 years ago

This is a problem with jedi. Because there are complex modules like numpy, it has to do some tricks in order to improve performance. For more information see https://github.com/Valloric/YouCompleteMe/issues/3291.