【问题标题】:What does I1101 mean in pylintpylint中的I1101是什么意思
【发布时间】:2020-09-22 16:04:26
【问题描述】:

I 在 pylint 中是什么意思?我之前没有看到以I 开头的错误消息。

基于https://docs.pylint.org/en/1.6.0/tutorial.htmlI不包含在以下列表中

  * (C) convention, for programming standard violation
  * (R) refactor, for bad code smell
  * (W) warning, for python specific problems
  * (E) error, for much probably bugs in the code
  * (F) fatal, if an error occurred which prevented pylint from doing

它与 C++ 扩展有关。

Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)

【问题讨论】:

    标签: pylint


    【解决方案1】:

    我在源代码中找到的(Pylint 2.6.0 版):

    "I1101": (
        "%s %r has no %r member%s, but source is unavailable. Consider "
        "adding this module to extension-pkg-whitelist if you want "
        "to perform analysis based on run-time introspection of living objects.",
        "c-extension-no-member",
        "Used when a variable is accessed for non-existent member of C "
        "extension. Due to unavailability of source static analysis is impossible, "
        "but it may be performed by introspecting living objects in run-time.",
    

    还有一个错误代码列表here,包括“I”。

    至于I是什么意思:

    1. 如果您可以重现该消息,那么我建议生成 Pylint 报告,然后打印一个包含您结果的所有错误类别的列表。希望I 类别也是如此。 要启用报告,当您运行 Pylint 时,只需添加标志 -rn--reports=y

    2. This 文档可能会帮助您了解更多信息,因此您可以根据需要禁用此错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-12-11
      • 2017-06-20
      • 2011-08-12
      • 2017-06-11
      • 2018-03-05
      • 2023-03-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多