Search code examples
vimpython-3.6flake8

Vim flake8 python 3.6 support


I've been looking for a little time now, and can't find an answer to my problem. I'm coding on vim and I tried the new format string version f'whatever {a_var}', but my flake8 / syntastic keep telling me that's a syntax error.

Do you have any idea on how to fix this ?

I already had a problem with vim-jedi for python3.6 and virtualenv, and after hours of research I found a hack in some github issue, but here I can't find anything.

Thanks in advance for your help.


Solution

  • You have to verify that your flake8 script uses python3.6. Run which flake8 in command line, open the file in vim (or directly run vim $(which flake8)) and see the shebang line (the first line of the file, it starts with #!). If it's not python3.6 — edit the line.