无法完全禁用 python linting Pylance VSCODE
Can't fully disable python linting Pylance VSCODE
我已经在网上搜索了很长时间,但似乎找不到解决我问题的方法。我安装了 Pylance(Python 的最新 Microsoft interperter)并且似乎根本无法禁用 linting。我尝试了很多选项,但 none 有效。下面是我的代码中 linting 有多烦人的截图。
我的 VSCode 设置文件如下所示:
{
// "python.pythonPath": "C://Anaconda3//envs//py34//python.exe",
// "python.pythonPath": "C://Anaconda3_2020//python.exe",
// "python.pythonPath": "C://Anaconda3_2020_07//python.exe",
"python.pythonPath": "C://Anaconda3//python.exe",
"python.analysis.disabled": [
"unresolved-import"
],
"editor.suggestSelection": "first",
"editor.fontSize": 15,
"typescript.tsserver.useSeparateSyntaxServer": false,
"workbench.colorTheme": "Monokai ST3",
"workbench.colorCustomizations":{
"editor.background": "#000000",
"statusBar.background" : "#000000",
"statusBar.noFolderBackground" : "#212121",
"statusBar.debuggingBackground": "#263238"
},
"window.zoomLevel": 0,
"editor.renderLineHighlight": "none",
"editor.fontFamily": "Meslo LG L",
"editor.tabCompletion": "on",
"editor.parameterHints.enabled": true,
"python.terminal.executeInFileDir": true,
"python.terminal.launchArgs": [
"-u"
],
"terminal.integrated.shell.windows": "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe",
"editor.lineHeight": 0,
"workbench.editor.scrollToSwitchTabs": true,
"python.autoComplete.showAdvancedMembers": false,
"python.languageServer": "Pylance",
"python.linting.enabled": false,
"python.linting.pylintEnabled": false,
"python.linting.lintOnSave": false,
"python.linting.flake8Enabled": false,
"python.linting.mypyEnabled": false,
"python.linting.banditEnabled": false,
"python.linting.pylamaEnabled": false,
"python.linting.pylintArgs": [
"--unsafe-load-any-extension=y",
"--load-plugin",
"pylint_protobuf",
"--disable=all",
"--disable=undefined-variable",
],
"python.linting.mypyArgs": [
"--ignore-missing-imports",
"--follow-imports=silent",
"--show-column-numbers",
"--extension-pkg-whitelist=all",
"--disable=all",
"--disable=undefined-variable",
],
}
enter image description here
有什么想法吗?
非常感谢任何帮助。
您可以通过以下方式禁用语言服务器:
"python.languageServer": "None"
我能够在 VSC 中单击扩展,搜索 Pylance,然后右键单击以卸载。您也可以禁用。
我已经在网上搜索了很长时间,但似乎找不到解决我问题的方法。我安装了 Pylance(Python 的最新 Microsoft interperter)并且似乎根本无法禁用 linting。我尝试了很多选项,但 none 有效。下面是我的代码中 linting 有多烦人的截图。
我的 VSCode 设置文件如下所示:
{
// "python.pythonPath": "C://Anaconda3//envs//py34//python.exe",
// "python.pythonPath": "C://Anaconda3_2020//python.exe",
// "python.pythonPath": "C://Anaconda3_2020_07//python.exe",
"python.pythonPath": "C://Anaconda3//python.exe",
"python.analysis.disabled": [
"unresolved-import"
],
"editor.suggestSelection": "first",
"editor.fontSize": 15,
"typescript.tsserver.useSeparateSyntaxServer": false,
"workbench.colorTheme": "Monokai ST3",
"workbench.colorCustomizations":{
"editor.background": "#000000",
"statusBar.background" : "#000000",
"statusBar.noFolderBackground" : "#212121",
"statusBar.debuggingBackground": "#263238"
},
"window.zoomLevel": 0,
"editor.renderLineHighlight": "none",
"editor.fontFamily": "Meslo LG L",
"editor.tabCompletion": "on",
"editor.parameterHints.enabled": true,
"python.terminal.executeInFileDir": true,
"python.terminal.launchArgs": [
"-u"
],
"terminal.integrated.shell.windows": "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe",
"editor.lineHeight": 0,
"workbench.editor.scrollToSwitchTabs": true,
"python.autoComplete.showAdvancedMembers": false,
"python.languageServer": "Pylance",
"python.linting.enabled": false,
"python.linting.pylintEnabled": false,
"python.linting.lintOnSave": false,
"python.linting.flake8Enabled": false,
"python.linting.mypyEnabled": false,
"python.linting.banditEnabled": false,
"python.linting.pylamaEnabled": false,
"python.linting.pylintArgs": [
"--unsafe-load-any-extension=y",
"--load-plugin",
"pylint_protobuf",
"--disable=all",
"--disable=undefined-variable",
],
"python.linting.mypyArgs": [
"--ignore-missing-imports",
"--follow-imports=silent",
"--show-column-numbers",
"--extension-pkg-whitelist=all",
"--disable=all",
"--disable=undefined-variable",
],
}
enter image description here
有什么想法吗? 非常感谢任何帮助。
您可以通过以下方式禁用语言服务器:
"python.languageServer": "None"
我能够在 VSC 中单击扩展,搜索 Pylance,然后右键单击以卸载。您也可以禁用。