VScode python pylint 报错(2019)解决及绿波浪线去除

VScode 报一些不必要的错误,我看网上加自己摸索的,解决了我的一些错误
首先在商店下载一个:Code Spell Checker
VScode python pylint 报错(2019)解决及绿波浪线去除_第1张图片
然后是打开 用户下的 pylint setting设置,
VScode python pylint 报错(2019)解决及绿波浪线去除_第2张图片
里面添加:

"python.linting.pylintArgs":[
        "--disable=no-name-in-module","--disable=import-error",
        "--disable=unused-import","--disable=unused-argument","--disable=missing-docstring",
        "--disable=unused-variable","--disable=wrong-import-order","--disable=ungrouped-imports",
        "--load-plugins",
    ],

如我的:

{
    "workbench.colorTheme": "Quiet Light",
    "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
    "editor.fontSize": 18,
    "editor.cursorStyle": "underline",
    "workbench.iconTheme": "vscode-icons",
    "editor.renderIndentGuides": false,
    "python.pythonPath": "C:\\py36\\python.exe",
    "cSpell.userWords": [
        
    ],
    "python.linting.pylintArgs":[
        "--disable=no-name-in-module","--disable=import-error",
        "--disable=unused-import","--disable=unused-argument","--disable=missing-docstring",
        "--disable=unused-variable","--disable=wrong-import-order","--disable=ungrouped-imports",
        "--load-plugins",
    ],
    "window.zoomLevel": 0
}

然后 , 打开你的文件,用上面的插件进行排错,
VScode python pylint 报错(2019)解决及绿波浪线去除_第3张图片
结果就是绿线消失,
setting的cSpell.userWords中加了一个排错,如我的就变成了:

"cSpell.userWords": [
        "dont"   # 这个就是上面点击的那个单词
    ],

记得保存就OK了
新开一个项目也不会报错了

你可能感兴趣的:(VScode python pylint 报错(2019)解决及绿波浪线去除)