Closed FatPigeorz closed 7 months ago
sorry for accidentally submitting the draft :) here is a detailed description
Jedi:
Pylance:
the Foo
class is defined in src/foo/lib.py, I'm wondering if it is possible to get the definition of Foo
via Jedi, or I can config something of jedi-langauge-server to get the definition. I've spent the a few days wrestling with this problem, and I'm starting to suspect that I might be missing something obvious. Any insights or fresh perspectives would be greatly appreciated
I've push the code for reproduction to this repo
You can give Jedi the correct sys path and everything works. Pylance seems to "arbitrarily" detect that there's a foo
package within src. This might also be saved in settings.json
. If you give Jedi that information it will work. Not sure how to do that via language server though.
You can give Jedi the correct sys path and everything works. Pylance seems to "arbitrarily" detect that there's a
foo
package within src. This might also be saved insettings.json
. If you give Jedi that information it will work. Not sure how to do that via language server though.
Appreciate your response. It seems that Pylance has special handling for certain scenarios.. For instance, in a previous use case, when I renamed the 'src' directory to a name like 'srccc,' Pylance also encountered a failure like jedi:(.
Hello there! 👋
I hope this message finds you well. I'm currently diving into the world of Jedi to implement some definition/reference retrival stuff. I've switched the language server of the VSCode Python extension to Jedi to gain a deeper understanding of the Jedi project, and also use the behaviour of vscode as a oracle to test my implementation.
However, I've encountered a situation where Jedi Language Server fails to resolve imports in certain cases, while Pylance succeeds in doing so.