Below is the elpy-config
,
Elpy Configuration
Virtualenv........: None
RPC Python........: 3.6.1 (/usr/bin/python3.6)
Interactive Python: python3.6 (/usr/bin/python3.6)
Emacs.............: 25.2.1
Elpy..............: 1.15.1
Jedi..............: 0.10.2
Rope..............: 0.9.4-1
Importmagic.......: 0.1.7
Autopep8..........: 1.3.1
Yapf..............: 0.16.2
Syntax checker....: flake8 (/usr/local/bin/flake8)
but syntax checker do not accept f-string syntax of python 3.6,
C-u C-c C-c
gives correct output in emacs, but syntax checker does recognise this syntax
> Hello, MICHAEL. Welcome!
Question:
Do I need to upgrade syntax checker?
Are you sure you have Flake8 installed for Python 3.6?
According to the docs:
It is very important to install Flake8 on the correct version of Python for your needs. If you want Flake8 to properly parse new language features in Python 3.5 (for example), you need it to be installed on 3.5 for Flake8 to understand those features. In many ways, Flake8 is tied to the version of Python on which it runs.
It seems like the version of Flake8 you have at /usr/local/bin/flake8
doesn't handle Python 3.6.