flake8插件配置

vim中vundle安装语法检测插件

Plugin 'vim-syntastic/syntastic'

添加flake8代码风格检查:

1

Plugin 'nvie/vim-flake8'

终端使用

检查文件

flake8 my.py

检查指定错误

flake8 --select H233 my.py

检查E开头的错误

flake8 --select E my.py

忽略指定错误

flake8 --ignore H233 my.py

vim命令模式下:

:call Flake8()

~/.config/flake8这个文件下面

忽略某些错误

最大长度设置

max-line-length = 120
[flake8]
ignore = E122,E501

猜你喜欢

转载自blog.csdn.net/lucyxu107/article/details/84931589