首页 > 解决方案 > CEWR Literals 的 Pylint 含义

问题描述

我已经搜索了一段时间,但没有给出详细的答案,使用 pylint 时会收到如下消息:

C:201, 0: Line too long (113/100) (line-too-long)
E:  3, 0: No name QImage in module QtCore
R: 27, 4: Too many statements (62/50) (too-many-statements)

除了我没有找到所有消息的好资源(因为搜索结果只讨论 linter 而不是已发布的文档)这一事实之外,我无法完全猜测文字C, E,RW确切含义。

标签: pythonpylint

解决方案


直接来自手册页:

OUTPUT
       Using the default text output, the message format is :

                MESSAGE_TYPE: LINE_NUM:[OBJECT:] MESSAGE

       There are 5 kind of message types :
           * (C) convention, for programming standard violation
           * (R) refactor, for bad code smell
           * (W) warning, for python specific problems
           * (E) error, for probable bugs in the code
           * (F) fatal, if an error occurred which prevented pylint from doing
       further processing.

推荐阅读