VSCode 去掉 Pylint 冗余的警告

如果使用 python 自带的 lint
在 VSCode 中依次点击 File -> Preferences -> Settings ,然后在右上角点击 Open Setting(JSON),在打开的 json 文件中添加以下语句:

"python.linting.pylintArgs": ["--errors-only"],

如:

{
    "workbench.colorTheme": "Default Dark+",
    "git.autofetch": true,
    "remote.SSH.remotePlatform": {
        "10.79.1.230": "linux"
    },
    "[python]": {
        "editor.wordBasedSuggestions": false
    },
    "python.linting.banditEnabled": true,
    "python.linting.pylintArgs": ["--errors-only"],

}

配置 Linting: Bandit Enabled


image.png

如果是vscode Pylint 插件
在 settings.json 里添加
"pylint.args": ["--errors-only"],

image.png
{
    "workbench.colorTheme": "Default Dark+",
    "git.autofetch": true,
    "remote.SSH.remotePlatform": {
        "10.79.1.230": "linux"
    },
    "[python]": {
        "editor.wordBasedSuggestions": false
    },
    "python.linting.banditEnabled": true,
    "pylint.args": ["--errors-only"],
    

}
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容