Disable all `pylint` 'Convention' messages

寵の児 提交于 2020-01-01 04:04:34

问题


Background

I find pylint useful, but I also find it is horrifically undocumented, has painfully verbose output, and lacks an intuitive interface.

I'd like to use pylint, but it keeps pumping out an absurd number of pointless 'convention' messages, e.g. C: 2: Line too long (137/80) etc.

Question

If I could disable these, pylint would be much more usable for me. How does one disable these 'convention' messages?

My own efforts

I've tried putting disable-msg=C301 in ~/.pylintrc (which is being loaded because when I put an error in there pylint complains) which I understand to be the "Line too Long" message based on running this command in the pylint package directory (documentation that can be found would be nice):

$ grep "Line too long" **/*.py checkers/format.py: 'C0301': ('Line too long (%s/%s)',

Yet this disable-msg does nothing. I'd disable the entire convention category with the disable-msg-cat= command, but there's no indication anywhere I can find of what an identifier of the convention category would be for this command — the intuitive disable-message-cat=convention has no effect.

I'd be much obliged for some direction on this issue.

Thank you.

Brian


回答1:


If I'm not mistaken, you should be able to use --disable-msg-cat=C (can't remember whether it's uppercase or lowercase or both) to accomplish this.

UPDATE: In later versions of pylint, you should use --disable=C



来源:https://stackoverflow.com/questions/3125333/disable-all-pylint-convention-messages

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!