-
-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discovery of stubs in a different folder #1078
Comments
Jedi does not respect Jedi follows this: https://peps.python.org/pep-0561/#type-checker-module-resolution-order I guess just put stubs in front of code in the PYTHONPATH. |
Makes sense!
Using |
I'm keeping this open for now, but I feel like this might not be fixed, since currently nobody is actively working on Jedi. I'm currently working on a Rust replacement for Jedi, but it will still take time (and it will probably support MYPYPATH). |
Cool! I can't wait to see the new rust program. |
I'm having trouble with discovery of
.pyi
stub files that live in a different folder from the.py
source file.Here is an example that works as expected:
If I set the environment variable
PYTHONPATH=code
and ifmain.py
contains the linefrom foo import bar
, thenjedi#goto_stubs()
works as expected (it finds the definition ofbar
incode/foo.pyi
).Here is an example that is not working:
I am having problems when the file layout looks like this:
In this situation,
jedi#goto_stubs()
does not work.I have tried the following environment variable settings:
PYTHONPATH=code:stubs
PYTHONPATH=code MYPYPATH=stubs
I would expect that the
.pyi
file can be discovered as long as it is discoverable onPYTHONPATH
orMYPYPATH
, but this seems not to be the case.The text was updated successfully, but these errors were encountered: