测试

测试

使用Flak8检测python代码的错误和警告

pip install flake8

flake8 test.py

实例:

[root@test3 ~]# flake8 test.py 
test.py:4:1: E302 expected 2 blank lines, found 1
test.py:9:1: E302 expected 2 blank lines, found 0
test.py:14:1: E302 expected 2 blank lines, found 0
test.py:23:1: E305 expected 2 blank lines after class or function definition, found 1

 

posted @ 2019-02-16 11:20  effortsing  阅读(166)  评论(0编辑  收藏  举报