Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable pep8 check in syntastic for python files

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?

like image 249
rgrinberg Avatar asked May 13 '13 10:05

rgrinberg


2 Answers

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'

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.

like image 158
Christian Geier Avatar answered Oct 21 '22 08:10

Christian Geier


Adding to Christians answer. You can also add specific checker args:

let g:syntastic_python_flake8_args = "--ignore=E501 --max-complexity 10"
like image 42
oz123 Avatar answered Oct 21 '22 08:10

oz123