python编码规范---利用flake8自动检测

安装
sudo pip install flake8

$ flake8 hello.py
hello.py:4:1: E302 expected 2 blank lines, found 1
hello.py:4:11: E999 SyntaxError: invalid syntax
hello.py:5:5: E113 unexpected indentation
hello.py:7:1: E305 expected 2 blank lines after class or function definition, found 1

你可能感兴趣的:(python编码规范---利用flake8自动检测)