Skip to content
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

UX: cluttered suggestion list when triggering autocomplete on function calls #14228

Closed
ogrisel opened this issue Mar 20, 2023 · 4 comments
Closed

Comments

@ogrisel
Copy link

ogrisel commented Mar 20, 2023

When triggering autocomplete on a function call, the valid signature symbols are

image

In my experience, I almost never want to autocomplete the name of a builtin function (abs, all, ...) or exception class (ArithmeticError...) when calling a function. I think the keys from the globals dict should be ranked lower in the list of suggestions, after the names inspected from the function signature or the locals dict. This would make jupyter a much more useful tool to interactively discover the API of recently imported Python package.

For comparison, the VS Code notebook editor use a more sensible order where signature argument names and symbol names from locals come first:

image

The same UX problem was originally reported for IPython under:

@ogrisel ogrisel added the bug label Mar 20, 2023
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Mar 20, 2023
@krassowski
Copy link
Member

I think we should fix this in IPython (ipython/ipython#12344). Would you have time to pick up ipython/ipython#13673 (it needs rebasing and small rewriting to use new ordered=True argument of matcher)?

@andrii-i
Copy link
Contributor

Removed bug label as this is not a bug.
@ogrisel please consider if you would be willing to do what @krassowski suggests and come back to us.

@ogrisel
Copy link
Author

ogrisel commented Mar 28, 2023

Sorry I won't have time to work on this in the foreseeable future.

@JasonWeill
Copy link
Contributor

Resolving this as a duplicate of ipython/ipython#12344. Once this is fixed in ipython, JupyterLab (which depends on ipython) will get the fix.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants