pyflakes is a
much faster (20x or more) version of pylint, and in some ways does a better job. However, it is not configurable
at all which is bizarre. Happily, flake8 wraps and provides configuration for pyflakes and the pep8 tool.
I don't remember whether pyflakes or flake8 come with Anaconda, but the usual pip install is all that is needed.
Documentation for both pyflakes and flake8 is poor, even by geek standards. The configuration-related code is way too complex, which has caused me considerable effort.
Anyway, Leo now has a pyflakes command which will use the flake8 configuration file if flake8 has been installed. Leo looks for the file "flake8" (no file extension) or (an addition for Leo) "flake8.txt". Leo looks in ~, then ~/.leo and then leo/test for these files.
Coming asap:
- Add a reference copy of flake8.txt to leo/test that disable complaints about Leo's default coding style.
- Create two separate commands: flake8 and pyflakes, so the user can choose between them explicitly.
At present, the pyflakes command actually runs flake8 if flake8 is installed.
- Configure the flake8 options.statistics, options.total_errors and options.benchmark settings from flake8.txt.
- Should be easy. It's not. I may have to ask for help.
- At present, these settings are set to True, True and False respectively.
- Optionally use flake8 to check external files on save, just as Leo presently checks their syntax.
flake8 is easily fast enough to make this feasible.
- Add leo/flake8-leo.py, so that people can run flake8 on Leo's sources, just as with pylint-leo.py.
Edward