作为一个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