pycharm, pep8 settings
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
PEP 8 coding style violation http://blog.csdn.net/zgljl2012/article/details/51907663
E265 block comment should start with ‘# ‘
E302 expected 2 blank lines, found 1
E305 expected 2 blank lines after class or function definition, found 0 ------E305
W391 blank line at end of file ------W292
钩选 Code compatibility inspection ==>兼容性检查 py2.7, py3.6

浙公网安备 33010602011771号