davidhalter / jedi-vim

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

Docstring missing for some functions using @_autogen_docstring #936

Closed argentum2f closed 3 years ago

argentum2f commented 5 years ago

Issue

Docstring is missing for some functions, but not others even in the same module. In matplotlib.pyplot pause() shows full docstring, whereas imshow() does not. The thing in common that I've found seems to be that the functions that don't show the docstring (in vim-jedi) all have something like this in place of a docstring (right before the function): @_autogen_docstring(Axes.imshow)

Steps to reproduce

Create file, input

import matplotlib.pyplot as plt
plt.imshow()
plt.pause()

Put cursor over imshow, press K -> function definition only (no docstring) Put cursor over pause, press K -> full docstring displayed

pydoc matplotlib.pyplot.imshow does give full docstring.

Output of “:verbose JediDebugInfo”

Global Python

Using Python version 2 to access Jedi.

Jedi
Jedi environment: <SameEnvironment: 2.7.5 in /usr>
Known environments
davidhalter commented 5 years ago

This might have been fixed on latest Jedi master. Pretty sure I fixed some docstring stuff in combination with decorators. Feel free to checkout the Jedi submodule to the latest master and let me know.

argentum2f commented 5 years ago

I'm not really sure how to do that. (I don't know that much about git). I tried:

git clone --recurse-submodules https://github.com/davidhalter/jedi-vim
cd jedi-vim/pythonx/jedi/
python setup.py install --user

(--user cause I don't jave root access)

Then ran vim again, but still have the same problem.

davidhalter commented 5 years ago

you don't need to install it. Just use cd jedi-vim/pythonx/jedi/; git checkout master. jedi-vim looks for the path itself.

davidhalter commented 4 years ago

Can you just check the latest jedi-vim master? (No need to use jedi master)