I have a problem with pyflake8 in vim, he started displaying some errors that he didn't show at all, like this:
我对vim中的pyflake8有一个问题,他开始显示一些他根本没有显示的错误,像这样:
models.py|1 col 1| D100 Missing docstring in public module
models.py|2 col 1| H306 imports not in alphabetical order (django.db.models, django.contrib.auth.models.user)
models.py|6 col 1| D204 1 blank line required after class docstring (found 0)
models.py|6 col 1| D205 1 blank line required between summary line and description (found 0)
models.py|6 col 1| D209 Multi-line docstring closing quotes should be on a separate line
models.py|6 col 1| D211 No blank lines allowed before class docstring (found 1)
models.py|9 col 1| H405 multi line docstring summary not separated with an empty line
models.py|9 col 53| H403 multi line docstrings should end on a new line
models.py|14 col 1| D210 No whitespaces allowed surrounding docstring text
models.py|14 col 1| D400 First line should end with a period (not '!')
I assume that these are some standard pep8 errors, but pyflakes8 didn't show them till today, when I did an upgrade on it. Current version 2.5.4 (pep8: 1.7.0, mccabe: 0.4.0, pep257: 0.2.1.post1, pyflakes: 1.0.0, hacking.core: 0.0.1, ProxyChecker: 0.0.1) CPython 2.7.6 on Linux
I did it because vim was showing error that pyflake is not working, after upgrade pyflake was working but it started showing this D and H errors, how to solve this situation?
我认为这是一些标准的pep8错误,但是pyflakes8直到今天才显示出来,当时我对它进行了升级。当前版本2.5.4 (pep8: 1.7.0, mccabe: 0.4.0, pep257: 0.2.1。post1 pyflakes:1.0.0,窃听。内核:0.0.1,ProxyChecker: 0.0.1) CPython 2.7.6我在Linux上这么做是因为vim显示了pyflake不工作的错误,升级了pyflake后,它开始显示D和H错误,如何解决这种情况?
1 个解决方案
#1
1
vim-flake8 uses the standard flake8 config file ~/.config/flake8
, which can be configured like this example from the docs.
vim-flake8使用了标准的flake8配置文件~/。配置/flake8,可以从文档中这样配置它。
The user settings are read from the ~/.config/flake8 file
(or the ~/.flake8 file on Windows). Example:
[flake8]
ignore = E226,E302,E41
max-line-length = 160
exclude = tests/*
max-complexity = 10
This looks like it was changed recently.
这看起来像是最近改变了。
#1
1
vim-flake8 uses the standard flake8 config file ~/.config/flake8
, which can be configured like this example from the docs.
vim-flake8使用了标准的flake8配置文件~/。配置/flake8,可以从文档中这样配置它。
The user settings are read from the ~/.config/flake8 file
(or the ~/.flake8 file on Windows). Example:
[flake8]
ignore = E226,E302,E41
max-line-length = 160
exclude = tests/*
max-complexity = 10
This looks like it was changed recently.
这看起来像是最近改变了。