Pycharm_关闭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/

原文地址:https://www.cnblogs.com/testlearn/p/14862559.html