-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
jedi.Script.Complete doesn't return expected result when package has only __init__.pyc and __init__.pyi #1949
Comments
Sorry, but without a list of files to reproduce this issue, I have no idea what your problem is. There is an almost 0 percent change that this simple use case doesn't work like it should, because cases like these have been tested very well within Jedi. So I'm a bit surprised that you have problems here. |
How about creating a folder in site-package like: mypackage all files are renamed from empty txt. from .f1 import mem1
|
As long as you do not give me a zip file with an executable file that reproduces your issue, I cannot do anything for you. |
jediissue.zip |
Is this zip enough? Thanks. |
Thanks a lot for the clean reproduction folder. It indeed looks like a bug. Thanks for bringing this up! I'm not sure if this should be a namespace package or not. Regardless completions should always work in this case. Oddly enough, it's weird that after removing the Please note that this is a bit of an obscure issue and does not have the highest priority. Feel free to try to fix it. I'm happy to help you a bit if you want to. |
@davidhalter Hi, I want to know why sub_modules_dict is not implemented for compiled modules, I copied code of sub_modules_dict to CompiledModule, then Script.Complete return expected value. Thanks! |
That's actually fine probably. I feel like the real question is: Why is I'm not sure I want |
Hi, I'm using vscode with jedi and developing a python package, there are init.pyc and init.pyi in the package' root directory. When I run:
jedi.Script('from myPackage.').complete(line = 1, column = 15)
the result is empty list. After I delete the init.pyc in root directory, the function will return expected result. But when I click 'go to definition' on myPackage, the result is 'No definition found'.
What's more, there init.pyc and init.pyi in myPackage\subFolder, When I run:
jedi.Script('from myPackage.subFolder import .').complete(line = 1, column = 32)
the result does not include the members of all, which is defined in init.pyi. If I add init.py in subFolder, the function will return expected result.
I'm not sure if these are bug or I should restructure my package.
version of jedi is 0.18.2.
Thank you.
The text was updated successfully, but these errors were encountered: