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

Exccessive completion of argument list for functions and properties #15724

Closed
MaksimZh opened this issue Mar 19, 2021 · 4 comments · Fixed by #15734 or #15749
Closed

Exccessive completion of argument list for functions and properties #15724

MaksimZh opened this issue Mar 19, 2021 · 4 comments · Fixed by #15734 or #15749
Assignees
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug

Comments

@MaksimZh
Copy link

MaksimZh commented Mar 19, 2021

Environment data

  • VS Code version: 1.54.2
  • Extension version: v2021.3.658691958
  • OS and version: Windows 10 Pro
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.1
  • Type of virtual environment used: N/A
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: N/A
  • Value of the python.languageServer setting: Jedi

Expected behaviour

Completion of standard print function:
prin -> print or print()
Completion of NumPy array shape property:
a.shap -> a.shape

Actual behaviour

Completion of standard print function:
prin -> print(sep=..., end=..., file=..., flush=...)
Completion of NumPy array shape property:
a.shap -> a.shape(value)

@MaksimZh MaksimZh added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Mar 19, 2021
@brettcannon
Copy link
Member

I can verify this is happening if you use JediLSP as your language server (which you might be due to being in an experiment). If you opt out of the experiment or switch to Pylance this will go away.

@MaksimZh
Copy link
Author

MaksimZh commented Mar 22, 2021

I confirm that either disabling experiments with "python.experiments.enabled": false or switching to Pylance eliminates this behavior in my setup.
Thanks!

@brettcannon
Copy link
Member

And just as a follow-up, we are going to be upgrading our dependencies which will remove this behaviour (although it does mean the better feature set of Jedi won't be available under Python 2).

@karthiknadig
Copy link
Member

This is fixed in the latest jedi-language-server. This PR will update the extension to use the latest one, in addition to falling back to old jedi for 2.7. #15734

@karthiknadig karthiknadig self-assigned this Mar 22, 2021
@karthiknadig karthiknadig added area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. triage labels Mar 22, 2021
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Mar 22, 2021
@ghost ghost removed the triage label Mar 22, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug
Projects
None yet
3 participants