Syntastic: Python checker returns syntax error on f string

Created on 23 Jan 2019  路  6Comments  路  Source: vim-syntastic/syntastic

When there is an f-string in python, it displays an error. See image below:
Python f-string syntax error

Most helpful comment

For those who might be having the same error.
run or put in .vimrc:
:let g:syntastic_python_checker = ['']

This does not resolve the issue for me.

My bad.
Try this?

let g:syntastic_python_checkers = ['python']
let g:syntastic_python_python_exec = 'python3'

All 6 comments

You're checking a Python 3 script with a Python 2 checker. Please see the FAQ.

For those who might be having the same error.
run or put in .vimrc:
:let g:syntastic_python_checker = ['<checker>']
For a list of available <checker>s, run:
help syntastic-checkers-python

You're checking a Python 3 script with a Python 2 checker. Please see the FAQ.

Thanks.

For those who might be having the same error.
run or put in .vimrc:
:let g:syntastic_python_checker = ['']

This does not resolve the issue for me.

For those who might be having the same error.
run or put in .vimrc:
:let g:syntastic_python_checker = ['']

This does not resolve the issue for me.

My bad.
Try this?

let g:syntastic_python_checkers = ['python']
let g:syntastic_python_python_exec = 'python3'

Try this?

let g:syntastic_python_checkers = ['python']
let g:syntastic_python_python_exec = 'python3'

This solves the problem for python checker. It does nothing for other Python checkers such as pyflakes or pylint. The easiest solution is still the one in the FAQ.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

albasili picture albasili  路  6Comments

ErikBjare picture ErikBjare  路  3Comments

jasonkuhrt picture jasonkuhrt  路  8Comments

ijanos picture ijanos  路  7Comments

cookiengineer picture cookiengineer  路  7Comments