禁用pep8语法检查中的python文件 [英] Disable pep8 check in syntastic for python files

查看:182
本文介绍了禁用pep8语法检查中的python文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了很多不遵循pep8的代码(我无法修复),并且希望syntastic不使用pep8语法检查器.有办法禁用它吗?

I work with enough code that does not follow pep8 (that I cannot fix) and would like syntastic to not use the pep8 syntax checker. Any way to disable it?

推荐答案

如果您将flake8用作python语法检查器,则可以这样做(将其放入 vimrc ftplugin/python.vim 文件):

If your are using flake8 as a python syntax checker you could do it like this (put it into your vimrc or ftplugin/python.vim file):

let g:syntastic_python_checkers=['flake8']
let g:syntastic_python_flake8_args='--ignore=E501,E225'

您需要显式地使每个错误类静默(并且不能从整体上禁用pep8检查).请参见 flake8文档

You need to silence each error class explicitly (and cannot disable pep8 checking as a whole). See the flake8 documentation and pycodestyle documentation (used to be pep8) for all error and warning codes.

这篇关于禁用pep8语法检查中的python文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆