2016-02-13 80 views
0

我有一個問題,在VIM pyflake8,他開始顯示一些錯誤,他沒有表現出可言,像這樣:VIM-flake8開始舒d和H錯誤

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 '!') 

我認爲這些都是一些標準的pep8錯誤,但pyflakes8直到今天才顯示出來,當時我對它進行了升級。當前版本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 我這樣做是因爲vim顯示錯誤,pyflake不工作,升級後pyflake正在工作,但它開始顯示這個D和H錯誤,如何解決這種情況?

+1

你不想要這些錯誤嗎? – Ben

回答

1

vim-flake8使用標準flake8配置文件~/.config/flake8,可以像docs這樣配置此示例。

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 

這看起來像是changed recently

+0

所以這就是問題,是的,這是我正在尋找的東西 – PetarP