Vscode-python: No autocomplete brackets added for user defined function with python extension

Created on 7 Jul 2020  路  7Comments  路  Source: microsoft/vscode-python

Environment data

  • VS Code version: 1.46.1
  • Extension version (available under the Extensions sidebar): 2020.6.91350
  • OS and version: Ubuntu 16.04
  • Python version (& distribution if applicable, e.g. Anaconda): 3.5.2
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: Python, version 2020.6.91350
  • Value of the python.languageServer setting: "Microsoft"/"Jedi

Expected behaviour

User defined functions are identified as function for both Microsoft and Jedi language server
Brackets can be auto added to user defined functions for both Microsoft and Jedi language server

Actual behaviour

User defined functions are identified as variable for Microsoft language server, as function for Jedi.
Brackets can not be auto added to user defined functions for Microsoft. Can be for Jedi language server

Steps to reproduce:

link to symbol reference
Using Jedi is not ideal since Intellisense requires Microsoft language server

microsoftlanguageserver

jedilanguageserver

type-bug

All 7 comments

@rhklite, thanks for letting us know about this. Do you see this problem when using the new pylance extension?

When using Microsoft language server, basic functions such as print() or functions from another module/class can be recognized properly as functions and would auto add brackets, but I can't seem to get auto brackets at all when using Pylance.

pylance

In my case, I don't even get bracket with inbuilt function like print, input and others also
it's just not adding any bracket to user-defined function and also to inbuilt function.
I hope this problem get solve as fast it's done because I get a habit of add bracket option

Im facing the same issue after the 1.47.2 update

In my case, I don't even get bracket with inbuilt function like print, input and others also
it's just not adding any bracket to user-defined function and also to inbuilt function.
I hope this problem get solve as fast it's done because I get a habit of add bracket option

I have the same problem. Using Jedi for the moment until this is fixed

Im facing the same issue after the 1.47.2 update

In my case, I don't even get bracket with inbuilt function like print, input and others also
it's just not adding any bracket to user-defined function and also to inbuilt function.
I hope this problem get solve as fast it's done because I get a habit of add bracket option

Same issue, "add brackets" don't work at all.

@rhklite, thanks for letting us know about this. Do you see this problem when using the new pylance extension?

I see the problem with Pylance. Actually it happens to all functions (not only user defined) as long as the Python language server is set to anything other than Jedi.

I tried with Pylance and Intellicode separately or together, and found that when the "python.languageServer" is set to either "Microsoft" or "Pylance", no brackets can be added with auto completion. That said, the effect of "python.autoComplete.addBrackets": true is over-written when "python.languageServer" is not Jedi.

Have to disabled Pylance and Intellicode altogether until this is fixed.

I originally posted the issue here: https://github.com/microsoft/pylance-release/issues/180

Was this page helpful?
0 / 5 - 0 ratings