Closed wtfzambo closed 1 year ago
At this time, jedi-language-server
doesn't provide those sorts of diagnostics, because Jedi does not provide them.
See here: https://github.com/pappasam/jedi-language-server#diagnostics
Related issue: https://github.com/pappasam/jedi-language-server#diagnostics
Neat, thanks @pappasam , at least now I know I'm not as stupid as I thought I was.
(PS: you posted the same link twice :) )
@pappasam sorry for the extra message, but I had to ask: is there a way one can use the features of Jedi and still be able to be warned about unresolved imports, or that's just impossible?
In theory that's probably possible, because you could use one language server for one completions and another one for diagnostics. But I feel like most editors probably did not implement that. Not sure about VSCode.
@davidhalter
I noticed that Pylint seems able to report unresolved imports by itself, thanks anyway!
@wtfzambo David's suggestion is actually how we currently recommend adding additional diagnostics: https://github.com/pappasam/jedi-language-server#diagnostics. Using a general purpose language server, you can configure pylint to provide diagnostics for Python files. One option for vscode: https://marketplace.visualstudio.com/items?itemName=Matts966.efm-langserver-vscode
Again, this is "jedi-language-server", not a kitchen-sink "Python language server". It focuses specifically on Jedi, third-party tools like pylint are out of scope for this project.
thanks for the additional explanation @pappasam . To be honest, I feel like I still barely understand language servers in general, for example I'm still not sure what the difference between Jedi and Jedi Language Server is 😅
Hello,
there's a high possibility that I'm stupid, but I've been bashing my head against this for the past 4 hours without reaching any meaningful conclusion.
I use VSCode with the Microsoft Python plugin, and I recently switched to Jedi Language server because imho it parses docstrings better than PyLance does.
However, contrarily to PyLance, it doesn't warn me about unresolved imports. E.g. on a newly created python virtual environment with nothing installed:
With PyLance:
With Jedi:
As you can see, it doesn't warn me about pandas import not being able to resolve. Which is extra weird since Jedi is still able to resolve installed modules, as it properly shows documentation and autocomplete for them, e.g.:
Current specs:
What am I doing wrong?