【问题标题】:How to show pylint message codes/ids in PyCharm Problems view and get quick fix?如何在 PyCharm 问题视图中显示 Pylint 消息代码/ID 并快速修复?
【发布时间】:2023-02-15 22:05:12
【问题描述】:

我在 PyCharm Community Edition 的问题视图中收到一些 pylint 警告:

A)我怎样才能告诉 PyCharm 在问题查看,这样我就可以手动抑制警告,而无需手动搜索相应的消息代码/id?

二)我如何教 PyCharm 提供快速修复以通过行注释抑制警告?

例如

“PyLint:局部变量太多”

=>

# pylint: disable=too-many-locals

有关的:

List of pylint human readable message ids?

How to show pylint message codes in VScode?

编辑

另请参阅 PyCharm Pylint 插件的相关问题票:

https://github.com/leinardi/pylint-pycharm/issues/92

【问题讨论】:

    标签: python pycharm pylint


    【解决方案1】:

    而标准问题视图不显示消息 ID,额外的皮林特视图确实(运行扫描后):

    不幸的是,该视图不提供快速修复。

    【讨论】:

      猜你喜欢
      • 2021-02-11
      • 1970-01-01
      • 1970-01-01
      • 2023-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-21
      相关资源
      最近更新 更多