function name should be lowercase

版权声明:做一个简单,明亮,快乐的手艺人。尊重知识,购买正版,抄袭请不要标签原创。 https://blog.csdn.net/u012706792/article/details/71787492

作为一个pyCharm新手,不得不说这款IDE写Python确实挺舒服。
不过因为代码风格问题,遇到了function name should be lowercase问题,着实烦人,在这里分享一下解决方案。

File –>Settings–>Editor–>Inspections–>Python–>PEP 8 naming convention violation

在右下角有一个Ignored errors列表控件,添加
N802
N803
N806

code    sample message
N801    class names should use CapWords convention
N802    function name should be lowercase
N803    argument name should be lowercase
N804    first argument of a classmethod should be named 'cls'
N805    first argument of a method should be named 'self'
N806    variable in function should be lowercase

N811    constant imported as non constant
N812    lowercase imported as non lowercase
N813    camelcase imported as lowercase
N814    camelcase imported as constant
阅读更多

扫码向博主提问

xusworld

非学,无以致疑;非问,无以广识
  • 擅长领域:
  • 老友记
  • 生活大爆炸
  • 机器学习
  • 权利的游戏
  • 老爸老妈的浪漫史
去开通我的Chat快问
换一批

没有更多推荐了,返回首页