On Tuesday, May 17, 2016 at 1:19:46 PM UTC-5, Edward K. Ream wrote: > > pyflakes <https://pypi.python.org/pypi/pyflakes>is a *much* faster (20x > or more) version of pylint, and in some ways does a better job. >
Leo now sports three stand-alone linters: leo-pylint.py, leo-pyflakes.py and leo-flake8.py, (collectively, leo-x.py) all in the top-level leo directory. You can use the -h command-line option to see available command-line arguments. As with leo-pylint.py, the typical usage is: "python2 leo-x.py args", which I invoke with a .bat/.sh file. As mentioned before, leo-flake8.py requires a configuration file, flake8 or flake8.txt in either ~, ~/.leo or leo/test. leo-pyflakes.py uses *no* configuration file. leo-pyflakes.py is super fast: 4.3 sec on my new, fast machine to check all 229 files specified with the -a option. Still to do: - Remove all pyflakes errors. All are minor, but most are valid. - Remove/suppress all flake8 errors. Many are irksome, but it's not hard to suppress unwanted messages. The settings to do so will be added to leo/test/flake8.txt. Edward P.S. Several cleanups: 1. Finally, I see how to recreate the equivalent of g.app.loadDir from outside of Leo: loadDir = g.os_path_finalize_join(g.__file__, '..', '..') This allows the leo-x.py files to compute the full paths of all files under test. This eliminates the need for "helper" code in the leoGlobals module. Previously, this helper code ran in a separate process, which caused problems with timing statistics on Linus. Now, the code can run within the leo-x.py files as normal code. leo-flake8.py and leo-pyflakes.py already use this technique. I'll retrofit leo-pylint.py with the new code asap. 2. At present, all three leo-x.py files contain exactly the same code to compute the list of files to be checked with the various command-line option. I'll soon move an encapsulated version of this code into leo.core.leoTest.py. EKR -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
