我是 emacs 的新手,并试图将它用于 python 编程。我已经安装了 elpy 并且一切正常,除了一件事 - 我收到了很多警告,错误,如 E401、E402、E501 等。所有都是可怕的红色。
经过一点研究,看起来这些错误来自 flake8。所以我配置 flake8 如下:
在 ~/.config/flake8 中,
[flake8]
ignore=E201,E203,E211,E221,E272,E251,E211,E222,E226,E228,E241,E301,E302,E401,E402,E501,E701,F401
max-line-length=160
exclude=tests/*
max-complexity=10
Run Code Online (Sandbox Code Playgroud)
但是这些错误仍然会出现。我也在.config/. 但是没有任何进展。我试图将setup.cfg&tox.ini放在项目根目录中,但这也不起作用。
有关更多信息,sublime flake8 repo 中有类似的票证。 https://github.com/SublimeLinter/SublimeLinter-flake8/issues/24
请让我知道是否有任何可行的解决方案或 emacs hacks。
以下是一些细节
Os - Linux Mint 17.3 Rosa
flake8 version - 3.0.0b1 (pyflakes: 1.2.3, pycodestyle: 2.0.0, mccabe: 0.5.0)
GNU Emacs 24.3.1
Run Code Online (Sandbox Code Playgroud)
提前致谢。