We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a class B that wraps another one A through composition. I have setup __getattr__ to transfer everything from B to A.
B
A
__getattr__
The completion is working but when I want to Go to on b.toto, I have no definition found.
Go to
b.toto
The completions were probably added there: #997
import jedi code = """ class A: def toto(self, a: int): ... class B: _a: A def __getattr__(self, name): return getattr(self._a, name) b = B() b.toto(a="1") """ jedi_script = jedi.Script(code=code) jedi_script.goto(line=16, column=1, follow_imports=True) # [<Name full_name='__main__.b', description='b = B()'>] jedi_script.complete(line=16, column=4) # [<Completion: toto>] jedi_script.goto(line=16, column=4, follow_imports=True) # []
I would expect that the function goto returns [<Name full_name='__main__.A.toto', description='def toto'>] like if I would apply it on a.toto.
goto
[<Name full_name='__main__.A.toto', description='def toto'>]
a.toto
It returns an empty array.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I have a class
B
that wraps another oneA
through composition. I have setup__getattr__
to transfer everything fromB
toA
.The completion is working but when I want to
Go to
onb.toto
, I have no definition found.The completions were probably added there: #997
Code
Expected
I would expect that the function
goto
returns[<Name full_name='__main__.A.toto', description='def toto'>]
like if I would apply it ona.toto
.Actual
It returns an empty array.
The text was updated successfully, but these errors were encountered: