Syntastic now with Flake8
by Tarek Ziadé
If you’re a VIM user and a Python coder, that could interest you.
Syntastic, a syntax checker for VIM now includes Flake8 as a checker for Python code.
Syntastic can be used to check for syntax errors in files opened in VIM. It has a pretty extensive list of supported languages.
For Python it had PyFlakes, and since the latest version, it has my small glue script “Flake8”, that reunites in a single stream: pep8, PyFlakes and a McCabe checker.
For Flake8 the next step is to support Python 3 — as soon as I find some time, or a volunteer 😉
Thanks to Sylvain Soliman (and Clayton Parker) !
The setup.py in your Mercurial repository is marked as executable, but has no hashbang line, so when I run it, it gets run as a shell script 😦
The usual technique is to run “python setup.py install” or “pip install Flake8” or “easy_install Flake8”
How do you install things usually ?
If setup.py file wasn’t marked as executable, I’d run it with “python setup.py”. If setup.py (or any other file) is marked as executable, I assume it already has the proper hashbang line to make the kernel launch it with python, so I’ll just run “./setup.py”. Unfortunately, as I mentioned, the file in your repo has the executable bit set but not the hashbang,
[…] Thanks to Sylvain Soliman (and Clayton Parker) ! Python Read the original post on Planet Python… […]
Thanx for the tip. I tryed to enable default complexity checking and disable some pep8 warnings with a bash alias but it didn’t worked. I also tryed to add args to g:syntastic_python_checker but it still didn’t worked. Anybody have an idea?
can you show me your config ?
I’m not really a vim script addict, I use those I find.
here my current vim folder. http://ama_beta.ge-technologie.fr/static/vim_folder.tgz
This config is more or less the same as this one: http://hg.cryptelium.net/hg/system/config/vim/
I reenabled b to back instead of breakpoint, disabled spatialmode, auto-shrink end of line white spaces…
Using vim 7.3 on ubuntu. thanx for help.
Hey.
As an avid vim and Python 3.X user, this looked interesting enough to fork Flake8 and add support for Py3.X.
Please have a look
https://bitbucket.org/PCManticore/flake8-3.
There is still much work to do. It does not handle nonlocal, nor expressions like “except Exception as something”.
This is promising, I am looking forward to merge it