-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
IntelliSense stopped providing completions for inherited variables and methods since 2018.2.0 #1072
Comments
Completion also broken in case of relative imports: |
Code used to testclass FactorMixin:
FACTOR_1 = 0.1
class Calc:
def sum(self, a, b):
return a + b
class BetterCalc(Calc, FactorMixin):
def multiply_factor(self, a):
return a * self.FACTOR_1
calc = BetterCalc() Do you happen to have Jedi installed globally? P.S.: That traceback doesn't really matter plus we have fixed it for |
I can reproduce this and I'm not the only one affected. Also it's not isolated to the provided example but our primary project suddenly "lost IntelliSense" . I don't have Jedi installed globally, nor in my virtualenv that is selected for the project. -- Update: I downgraded extension by manually installing 2018.1 from vsix and completion is working as expected on exactly the same project and virtualenv. There is something that causes this behaviour in I request to reopen this issue. cc: @DonJayamanne |
Unfortunately without a way to reproduce the problem we can't fix it. And we can't roll back the version of Jedi as it fixed a bunch of other bugs that people were encountering. Can you upload a sample project that is triggering the problem? |
I was able to reproduce on following versions:
IntelliSense works on both
I'm able to reproduce this without project - with a new instance of vscode, just open a new, empty file, select -- Update [
{
"kind": 2,
"label": "multiply_factor",
"sortText": "__multiply_factor",
},
] I don't know how to debug the language server part so I was able only to trace to sending commands to jediProxy. |
Same issue, |
Same here, py2.7.11 (pyenv) |
So it sounds like a problem in Jedi itself that broke with the 0.11 release. Perhaps it's because you're using classic classes instead of new-style classes in Python 2 (i.e. you're not inheriting from Would someone like to file this issue upstream? |
Doesn't make any difference. Checked right now with the calc example. Also, in our project all base classes and mixins do inherit from
I think it's better if one of the vscode-python maintainers reports this issue. You know more details about which version of Jedi is embedded and how it was altered or integrated. |
@davidhalter is this a known regression in Jedi? |
This is not a known regression. It's a bug, I can just confirm with latest Jedi master. Thanks for finding it. |
Fixed on Jedi master. |
Environment data
Actual behavior
After one of the last updates of vscode-python extension, IntelliSense stopped providing completions for variables and methods inherited from parent classes and/or mixins. Completion is only provided for variables and methods declared on the derived class.
Expected behavior
Completions are available for inherited variables and methods from parent classes and mixins and from derived class.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: