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

python.autoComplete.addBrackets not working #18183

Closed
1 task done
r-owen opened this issue Dec 14, 2021 · 1 comment
Closed
1 task done

python.autoComplete.addBrackets not working #18183

r-owen opened this issue Dec 14, 2021 · 1 comment
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@r-owen
Copy link

r-owen commented Dec 14, 2021

VS Code version

1.63.1

Extension version

v2021.12.1559732655

OS type

macOS

OS version

11.6.1

Python distribution

Anaconda

Python version

3.8.8

Language server

Jedi

Expected behaviour

As per https://code.visualstudio.com/docs/python/settings-reference I expect to be able to disable adding brackets when auto-completing an exception class name or function name. That page documents the python.autoComplete.addBrackets setting for this purpose, but it does not show up in the standard settings editor and when I manually add it to the settings json file VSCode warns "Unknown Configuration Setting" and the setting is grayed out and has no effect.

Actual behaviour

I see no way to disable adding brackets when auto-completion an exception class name or function name. This is especially annoying for exception class names because in catch clauses parenthesis are forbidden.

Steps to reproduce

  • Run VSCode 1.63.1 configured to use the Jedi language server (I have no idea if Jedi is relevant and this problem also appeared in the previous version of VSCode, and possibly earlier).
  • Edit a Python file
  • Type enough letters of Exception for autocomplete to suggest the word. Accept the automatic completion.
    VSCode adds closing parenthesis, which I don't want.
  • The page https://code.visualstudio.com/docs/python/settings-reference says that python.autoComplete.addBrackets is a setting and it defaults to false. That sounds perfect, though it is worrisome that it defaults to false and I don't remember ever setting it to true.
  • Bring up the standard settings editor and notice that no such setting exists.
  • Edit the settings json file and add the setting: "python.autoComplete.addBrackets": false,
    Notice that VSCode complains "Unknown Configuration Setting" in the bar along the bottom, and the setting is grayed out and has no effect.

So two issues:

  • How do I disable this unwanted cleverness now? Apparently the setting you document for this purpose is gone and the default for the replacement is to add the unwanted parenthesis.
  • Your Python settings documentation page is outdated. Please update it.

Logs

Experiment 'pythonaa' is active
Experiment 'pythonTensorboardExperiment' is active
Experiment 'PythonPyTorchProfiler' is active
Experiment 'pythonDeprecatePythonPath' is active

~/UW/LSST/lsst_stack/miniconda/bin/conda info --json
~/UW/LSST/lsst_stack/miniconda/envs/local/bin/python ~/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/interpreterInfo.py
/usr/bin/python ~/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/interpreterInfo.py
/usr/bin/python3 ~/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/interpreterInfo.py
Python interpreter path: ~/UW/LSST/lsst_stack/miniconda/envs/local/bin/python
/usr/lib/python2.7 ~/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/interpreterInfo.py
/usr/local/bin/python3 ~/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/interpreterInfo.py
~/UW/LSST/lsst_stack/miniconda/bin/python ~/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/interpreterInfo.py
~/UW/LSST/lsst_stack/miniconda/envs/eups-base/bin/python ~/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/interpreterInfo.py
~/UW/LSST/lsst_stack/miniconda/envs/lsst-scipipe-0.4.1/bin/python ~/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/interpreterInfo.py
~/UW/LSST/lsst_stack/miniconda/envs/square/bin/python ~/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/interpreterInfo.py
Starting Jedi language server.
~/UW/LSST/lsst_stack/miniconda/envs/local/bin/python -m flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/UW/LSST/tsrepos/ts_ess_csc/python/lsst/ts/ess/csc/rpi_data_client.py
cwd: ~/UW/LSST/tsrepos/ts_ess_csc
~/UW/LSST/lsst_stack/miniconda/bin/conda info --json
##########Linting Output - flake8##########
". /Users/rowen/UW/LSST/lsst_stack/miniconda/bin/activate && conda activate local && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python /Users/rowen/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/printEnvVariables.py"

Code of Conduct

  • I agree to follow this project's Code of Conduct
@r-owen r-owen added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Dec 14, 2021
@paulacamargo25
Copy link

We've open microsoft/vscode-docs#5030 for updating our documentation.

And for turning this feature off, is a duplicate of #15858.

@karthiknadig karthiknadig removed the triage-needed Needs assignment to the proper sub-team label Jan 13, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants