Python-mode: Use flake8 instead of pyflakes

Created on 13 Feb 2012  路  3Comments  路  Source: python-mode/python-mode

Because its more powerfull tool (pyflakes, pep8, mccabe).

Also maybe set it as default linter instead a pylint?

Most helpful comment

Sorry to wake this from the dead, but I'd argue there's a meaningful difference between operating pyflakes and pep8 side-by-side and operating pyflakes - the latter allows you to configure pyflakes to ignore certain warnings for a certain context (a specific statement, scope or module), much like pylint allows.

This is much stronger and is an almost mandatory ability; I want to be sure that when I ignore a statement for an unused import warning, I don't lose the ability to get warnings on other errors!

An I'd prefer to have this ability without resorting to pylint because:

  1. pyflakes is much faster and I can use on-the-fly linting with it.
  2. Linting is broken (for me) on the latest stable release, and while it works on the current dev release, specifically pylint is broken for it (it seems it can only process one change to a file, and then it ignores all changes and fixes and keep showing the old errors, no matter what linting mode is set)

(I ended up switching to vim-flake8, but I have to say that it's would have been much nicer having this functionality as part of vim-python-mode, without having to install flake8 and another plugin, which also doesn't support on-the-fly linting)

All 3 comments

+1

Now python-mode have this checkers: pylint, pyflakes, pep8, mccabe.
And allow uses many checkers in some time, ex: let g:pymode_lint_checker = "pep8,mccabe,pyflakes"

Also added options: g:pymode_lint_ignore, g:pymode_lint_select

Sorry to wake this from the dead, but I'd argue there's a meaningful difference between operating pyflakes and pep8 side-by-side and operating pyflakes - the latter allows you to configure pyflakes to ignore certain warnings for a certain context (a specific statement, scope or module), much like pylint allows.

This is much stronger and is an almost mandatory ability; I want to be sure that when I ignore a statement for an unused import warning, I don't lose the ability to get warnings on other errors!

An I'd prefer to have this ability without resorting to pylint because:

  1. pyflakes is much faster and I can use on-the-fly linting with it.
  2. Linting is broken (for me) on the latest stable release, and while it works on the current dev release, specifically pylint is broken for it (it seems it can only process one change to a file, and then it ignores all changes and fixes and keep showing the old errors, no matter what linting mode is set)

(I ended up switching to vim-flake8, but I have to say that it's would have been much nicer having this functionality as part of vim-python-mode, without having to install flake8 and another plugin, which also doesn't support on-the-fly linting)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kostochkin picture kostochkin  路  8Comments

zeraus picture zeraus  路  11Comments

qazip picture qazip  路  5Comments

nachogoro picture nachogoro  路  11Comments

timfeirg picture timfeirg  路  4Comments