有效语法的语法错误突出显示 - Python 3.6
Syntax error highlight for valid syntax - Python 3.6
下面是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)
但语法检查器不接受 python 3.6、
的 f 字符串语法
C-u C-c C-c
在 emacs 中给出正确的输出,但语法检查器确实识别这种语法
> Hello, MICHAEL. Welcome!
问题:
我需要升级语法检查器吗?
您确定为 Python 3.6 安装了 Flake8 吗?
根据 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.
您在 /usr/local/bin/flake8
的 Flake8 版本似乎无法处理 Python 3.6.
下面是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)
但语法检查器不接受 python 3.6、
的 f 字符串语法C-u C-c C-c
在 emacs 中给出正确的输出,但语法检查器确实识别这种语法
> Hello, MICHAEL. Welcome!
问题:
我需要升级语法检查器吗?
您确定为 Python 3.6 安装了 Flake8 吗?
根据 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.
您在 /usr/local/bin/flake8
的 Flake8 版本似乎无法处理 Python 3.6.