首页 > 解决方案 > 使用 Visual Studio 代码在评论中忽略 pep8(E501)

问题描述

如何使用 Visual Studio 代码忽略 Python 注释中的 pep8 (E501)。我需要的是忽略 Python 注释中的警告,而不是 Python 代码中的警告。似乎将 python.linting.pep8Enabled 设置为 false 将忽略所有警告。如何自定义我的 setting.json?

标签: visual-studio-codepep8

解决方案


看起来我有同样的问题,我用过

"python.linting.pep8Args": ["--ignore=E501"]

在我的 settings.json 中忽略它。


推荐阅读