You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PythonVScode extension doesn`t seem to implement jedi properly - the extension cannot locate the correct symbol definition #171
In other editors' implementations of jedi can lookup the user defined object, and find the method definition (csv_handle has the writerow() and writerows() methods, and they do show up in some other editor):
The vscode python extension implementation of jedi cannot lookup any method which belong to the object of some object of some imported class (label_handle has the writerow() and writerows() methods, but they do not show up in vscode. Instead, vscode show the incorrect methods which don`t actually belong to label_handle object):
(* The imported class in the above and below showcase is with the Python standard library.)
The vscode python extension implementation of jedi cannot even lookup any user defined MACRO value (it shows the data type instead, which is pretty much useless for us):
As I also investigated this issue a lot, I found it is not the problem of jedi itself. It is vscode python extension does not use the jedi as correctly as it should.
That`s why we have this problem haunting many of us python programmers who are using this extension right now.
Copied from original issue: DonJayamanne/pythonVSCode#1182
It returns no completions for me. I think Jedi is having trouble since _csv.writer is a builtin function. At least that's for the first mentioned issue, not sure about the rest...
Could you post a snippet of code for which completions work for you in some
other editor and doesn't in VS Code? With the editor, plugin, Jedi and Python
version used so it can be reproduced. Note that I only tried the first issue mentioned here.
BTW did you try the snippet?
בתאריך 2 בפבר' 2018 21:13, "Scott" <notifications@github.com> כתב:
It shows it on the right hand side of a completion suggestion. VS Code is probably not using this property. Only showing the doc string for the type of the completion which is what we are seeing (I think it might even be getting the doc string by itself rather than relying on Jedi).
Activity
brettcannon commentedon Dec 11, 2017
All we've done is triaged the issue. No specific plans on addressing this issue have been made yet.
brettcannon commentedon Jan 17, 2018
Don Jayamanne (@DonJayamanne) do you happen to know how we may not be hooking into Jedi fully as suggested by circlecrystal? I've verified that at least with:
doesn't lead to intellisense for
writer.segevfiner commentedon Feb 1, 2018
Are you sure this is really an issue with Jedi? Try this:
It returns no completions for me. I think Jedi is having trouble since
_csv.writeris a builtin function. At least that's for the first mentioned issue, not sure about the rest...segevfiner commentedon Feb 2, 2018
segevfiner commentedon Feb 3, 2018
For the third issue. Showing the values of stuff is done, in Atom at least, by this bit of code:
https://github.com/Microsoft/vscode-python/blob/fafd0f8888b8d6a9a995b8da4495c8a83d3f9a9e/pythonFiles/completion.py#L60-L70
Called from here:
https://github.com/Microsoft/vscode-python/blob/fafd0f8888b8d6a9a995b8da4495c8a83d3f9a9e/pythonFiles/completion.py#L220
It shows it on the right hand side of a completion suggestion. VS Code is probably not using this property. Only showing the doc string for the type of the completion which is what we are seeing (I think it might even be getting the doc string by itself rather than relying on Jedi).
P.S. The code throws a bunch of lint warnings from a linter like flake8, and in particular
ARGUMENT_REis not defined for this bit of code:https://github.com/Microsoft/vscode-python/blob/fafd0f8888b8d6a9a995b8da4495c8a83d3f9a9e/pythonFiles/completion.py#L254-L255
Though it's probably currently unused by this extension.
elliott-beach commentedon Feb 10, 2018
Here is the behavior in Atom, by the way (I couldn't figure out issue no. 2):
For
csv.writer:For constants:
This is using python2, atom 1.23.3, and autocomplete python 1.10.5. As to what version of Jedi they use, it's custom-patched, but available at https://github.com/autocomplete-python/autocomplete-python/tree/223e0c7ae2a97008c80709bac3d5d2c12807437a/lib/jedi.
MikhailArkhipov commentedon Feb 17, 2018
Looks like this issue accumulated assorted cases. Jedi 0.11.1 (latest) was integrated. This works
Flask and go to definition also works
ARGUMENT_RE.match(p.description)]is fixedI am going to close this one. Feel free to open separate issues for 2018.2 (you can try insider's build)