python - Pylintrc 配置仅显示错误

标签 python python-3.x visual-studio-code pylint pylintrc

我找不到一个简单的 ~/.pylintrc 文件来忽略除错误之外的所有内容。

目前我已将其设置为:

[MESSAGES CONTROL]
disable=W

从此similar stackoverflow answer 。理论上这应该消除警告,但它对我不起作用,即使在重新加载窗口后也是如此。

我只想显示错误(红色)而不是警告(绿色)

enter image description here

最佳答案

我正在尝试解决同样的问题!你的帖子帮助了我。

pylint 有 several categories of checks :

  • C convention related checks
  • R refactoring related checks
  • W various warnings
  • E errors, for probable bugs in the code
  • F fatal, if an error occurred which prevented pylint from doing further processing.

因此,如果您想阻止除 E 和 F 之外的所有内容,请在 ~/.pylintrc 中执行以下操作:

[MESSAGES CONTROL]
disable=C,R,W

关于python - Pylintrc 配置仅显示错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52300046/

相关文章:

python-3.x - 如何评估路径中的双星号(星号)?

python - 按层次算法排序

python - 将 Anaconda MKL 链接到 C++/Cython 程序

python - 基于 bool 值的 Django 管理下拉菜单

visual-studio-code - 为什么 VS Code 1.75 在运行所选文本时将焦点移至终端?

visual-studio-code - 更改 VS Code 中注释周围字符的颜色

visual-studio-code - 有没有办法在 Visual Studio Code 中安装扩展列表?

python - 如何获取过滤后的 Panda 系列的索引?

python - 在 python 中计算二维网格上的一组的有效方法是什么? [下图]

python - 使用 spaCy 去除标点符号;属性错误