我如何使用Visual Studio代码在Python注释中忽略PEP8(E501(。我需要的是忽略python评论中的警告,而不是在Python代码中。似乎将python.linting.pep8enabled设置为false将忽略所有警告。我如何自定义我的设置?
看起来我遇到了同样的问题,我使用了
"python.linting.pep8Args": ["--ignore=E501"]
在我的设置中忽略它。
我通常使用noqa: E501
开始评论。
例如:
# noqa: E501 - Here, I can write my inline comment with more than 79 characters.