[英]Get error code for disabling in pylint from error message
If you have a main.py file and from the command line run pylint main.py 如果您有一个main.py文件,并从命令行运行pylint main.py
Pylint throws errors/status/etc like Wrong hanging indentation. Pylint会抛出错误/状态等错误的悬挂缩进。 'name': |
'名称':| ^ (bad-continuation)
^(糟糕的延续)
How do I find out what the error code of (bad-continuation) is so I can disable it? 我如何找出(错误连续性)错误代码,以便可以将其禁用?
I know I can run pylint main.py -d E1101 -d F0401 我知道我可以运行pylint main.py -d E1101 -d F0401
So I want either a master list of pylint error codes mapped to messages or a way to look it up from the messages. 所以我想要映射到消息的pylint错误代码的主列表,或者从消息中查找它的方法。
thanks 谢谢
Do you mean like this? 你是这个意思吗 PyLint Codes
PyLint代码
For how to have PyLint directly print out the relevant codes, see this answer . 有关如何让PyLint直接打印出相关代码,请参见此答案 。
Nowadays, you don't need the message shortcodes anymore. 如今,您不再需要消息简码 。
The message id of bad-continuation
is simply bad-continuation
. bad-continuation
的消息id就是bad-continuation
。
pylint main.py -d bad-continuation
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.