-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
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