Switching flake8 between Python 2 and 3

168 views
Skip to first unread message

Kannan Goundan

unread,
Jan 29, 2015, 2:41:36 AM1/29/15
to vim-sy...@googlegroups.com
I use this to switch between Python 2 and Python 3 for the 'python' checker:

    let g:syntastic_python_python_exec="python"
    let g:syntastic_python_python_exec="python3"

I was wondering how to do the same for the 'flake8' checker.

It looks like Syntastic just executes the 'flake8' command.  If, instead, it did:

    ${syntastic_python_python_exec} -m flake8 ...

Then flake8 would take advantage of my setting for the 'python' checker.  Is there a way to accomplish this?

lcd...@gmail.com

unread,
Feb 5, 2015, 11:21:25 AM2/5/15
to vim-sy...@googlegroups.com
Nope, checkers are completely independent to one another.  Create wrappers and point g:syntastic_python_flake8_exec to them.

/lcd
Reply all
Reply to author
Forward
0 new messages