microsoft / PTVS

Python Tools for Visual Studio
https://aka.ms/PTVS
Apache License 2.0
2.53k stars 676 forks source link

Checking "Automatically add brackets to functions" has no effect. #7958

Open linette-zyy opened 2 months ago

linette-zyy commented 2 months ago

Environment image

Steps to Reproduce 1.Check "Automatically add brackets for functions" (Tools/Options/Text Editor/Python/Advanced) 2.Add "import os" to python file. 3.Write "os.getc", you'll see autocomplete for os.getcwd, selecting it, ensure:

Expected behavior Auto-complete adds os.getcwd() to the source code.

Additional context and screenshots

Only os.getcwd is added to the file.

image

StellaHuang95 commented 2 months ago

@linette-zyy I can't repro in Microsoft Visual Studio Enterprise 2022 (64-bit) - Int Preview Version 17.12.0 Preview 1.0 [35130.250.main]. Could you verify?

linette-zyy commented 2 months ago

I can repro in today's build. Python installed from VS. image Only os.getcwd is added to the file. 13

StellaHuang95 commented 2 months ago

Might be the pylance version that's making a difference. What's your pylance version?

linette-zyy commented 2 months ago

I can repro in today's build. Python installed from VS. image

StellaHuang95 commented 2 months ago

I can repro, this is also a regression since pylance 2024.7.104. Might have the same root cause as https://github.com/microsoft/PTVS/issues/7974

StellaHuang95 commented 1 month ago

@linette-zyy can you check if it still repros? Thanks!

linette-zyy commented 1 month ago

I can repro in today's build. Python installed from VS. image