Pycharm_关闭PEP8规范提示

关闭PEP8告警

全是小写字母,可能与以往的习惯不大一样,将这样的警告忽略的方法如下:

File →Settings→Editor→Inspections→Python→PEP 8 naming convention violation

在右下角的"Ignored errors"中,添加要忽略的告警ID。

常忽略的告警ID如下:

N802:忽略 function name should be lowercase 的提示

N803:忽略 argument name should be lowercase 的提示

N806:忽略 variable in function should be lowercase 的提示


更多告警ID如下:

PEP 8 coding style violation 的告警ID查看 https://pep8.readthedocs.io/en/latest/intro.html#error-codes

PEP 8 naming convention violation 的告警ID查看:https://pypi.org/project/pep8-naming/

Python告警

比如,屏蔽self定义的参数需要在__init__定义的提示

 

屏蔽方法如下

 

 

posted @ 2021-06-08 14:14  码上测  阅读(685)  评论(0编辑  收藏  举报