VScode python pylint 报错(2019)解决及绿波浪线去除 您所在的位置:网站首页 vscode去掉代码底下的波浪线 VScode python pylint 报错(2019)解决及绿波浪线去除

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

2022-03-26 14:19| 来源: 网络整理| 查看: 265

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了 新开一个项目也不会报错了



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有