VScode python pylint 报错(2019)解决及绿波浪线去除 - Go语言中文社区

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


VScode 报一些不必要的错误,我看网上加自己摸索的,解决了我的一些错误
首先在商店下载一个:Code Spell Checker
在这里插入图片描述
然后是打开 用户下的 pylint setting设置,
在这里插入图片描述
里面添加:

"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
}

然后 , 打开你的文件,用上面的插件进行排错,
在这里插入图片描述
结果就是绿线消失,
setting的cSpell.userWords中加了一个排错,如我的就变成了:

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

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

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_44725128/article/details/89924659
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-03-01 21:48:49
  • 阅读 ( 2197 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢