以下是我的 flycheck 错误如何在 emacs 上显示的示例:
Method name "createQATask" doesn't conform to
'[a-z_][a-z0-9_]{2,30}$' pattern [invalid-name]
这是我正在运行的检查器(通过检查C-c ! v
):
Syntax checkers for buffer __manifest__.py in python-mode:
First checker to run:
python-flake8
- may enable: yes
- executable: Found at /usr/bin/python3
- configuration file: Not found
- `flake8' module: Found at "/home/devdesk4/.local/lib/python3.5/site-packages/flake8/__init__.py"
- next checkers: python-pylint, python-mypy
Checkers that may run as part of the first checker's chain:
python-pylint
- may enable: yes
- executable: Found at /usr/bin/python3
- configuration file: Found at "/home/devdesk4/.pylintrc"
- `pylint' module: Found at "/home/devdesk4/.local/lib/python3.5/site-packages/pylint/__init__.py"
- next checkers: python-mypy
Checkers that could run if selected:
python-pycompile select
- may enable: yes
- executable: Found at /usr/bin/python3
- next checkers: python-mypy
我已经尝试禁用python-pylint
的配置文件,但行为仍然存在。我还尝试了一个.emacs
仅包含以下内容的最小配置:
(setq package-archives
'(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")
("melpa-stable" . "https://stable.melpa.org/packages/")))
(use-package flycheck
:ensure t
:init
(global-flycheck-mode t))
这些符号 ( "
, '
) 是否没有正确显示,或者这是我可以覆盖的某种默认飞行检查配置?
2020 年 4 月 25 日更新(可能的解决方案)
奇怪的是,我执行pip install --upgrade pylint
只是为了检查我是否真的拥有最新版本的pylint
,并且它从 升级2.3.0
到2.4.4
,并且解决了这个问题。
但是,此解决方案与使用https://pypi.org/project/pylint-odoo/冲突,因为它将我恢复到2.3.0
具有那些 html-escape 序列的版本。
当天更新
已确认这是 Pylint 中的上游错误。