You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue came up in this PR in the Altair repo were we are trying to improve autocompletion for IDEs such as VS Code as well as Jupyter with installed JupyterLSP and python-lsp-server. The approach suggested in the PR works for VS Code but not for JupyterLSP. Let me know if this is not a Jedi but a python-lsp-server or jupyterlsp issue.
As a large part of the codebase of Altair is auto-generated, the current approach relies on some type hinted decorators. The actual decorator we use is more complex but I tried to reduce it to a minimal reproducible example below. I'm running this on Python 3.9 with newest Jupyterlab, Jupyterlsp, and python-lsp-server[all]:
When removing Callable from the decorate function it still shows Self as return type and can now complete another_method:
The expected behaviour would be that another_method can be completed even with the Callable annotation, especially as it still is aware of the return type hint Self.
The text was updated successfully, but these errors were encountered:
The issue came up in this PR in the Altair repo were we are trying to improve autocompletion for IDEs such as VS Code as well as Jupyter with installed JupyterLSP and python-lsp-server. The approach suggested in the PR works for VS Code but not for JupyterLSP. Let me know if this is not a Jedi but a python-lsp-server or jupyterlsp issue.
As a large part of the codebase of Altair is auto-generated, the current approach relies on some type hinted decorators. The actual decorator we use is more complex but I tried to reduce it to a minimal reproducible example below. I'm running this on Python 3.9 with newest Jupyterlab, Jupyterlsp, and python-lsp-server[all]:
return_self
correctly showsSelf
as return type:but it cannot complete `another_method`
When removing
Callable
from thedecorate
function it still showsSelf
as return type and can now completeanother_method
:The expected behaviour would be that
another_method
can be completed even with theCallable
annotation, especially as it still is aware of the return type hintSelf
.The text was updated successfully, but these errors were encountered: