VSCode:尽管安装了插件,Python linting也无法正常工作

时间:2019-06-09 12:24:06

标签: python visual-studio-code lint

这是我的用户设置:

{
   "editor.fontSize": 16,
    "editor.fontFamily": "Menlo",
    "workbench.iconTheme": "ayu",
    "workbench.settings.editor": "json",
    "workbench.settings.openDefaultSettings": true,
    "workbench.settings.useSplitJSON": true,
    "debug.console.fontSize": 14,
    "terminal.integrated.fontSize": 15,
    "terminal.integrated.cursorStyle": "underline",
    "terminal.integrated.cursorBlinking": true,
    "workbench.colorTheme": "Predawn",
    "editor.minimap.enabled": false,
    "editor.rulers": [80,120],
    "python.linting.enabled": true,
    "python.linting.pep8Path": "pep8",
    "python.autoUpdateLanguageServer": false,
    "python.analysis.logLevel": "Warning"
}

我还安装了pep8

➣ $ which pep8
/Users/pkaramol/Workspace/apiflask/venv/bin/pep8
(venv) Sun Jun 09-15:20:46 ~/Workspace/apiflask

尽管名为

的相关插件,但python linting无法正常工作
  

视觉代码的Python扩展

正在安装。

有什么办法解决这个问题吗?

编辑:我已经在VSCode中选择了virtualenv,如下图所示:

enter image description here

编辑:从VSCode终端运行pep8的操作也如下所示:

enter image description here

0 个答案:

没有答案