New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eclim/autoload/eclim/python/validate.vim bug: don't assume pyflakes returncode <= 1 #33
Comments
What version of pyflakes are you using? I have the Divmod pyflakes 0.4.0 and don't have this issue. Are you using a development version? Perhaps the fork by Kevin Watters? |
I suspect it is the same version. The Ubuntu Lucid package version is 0.4.0-1. If I save the following to "x.py": #!/usr/bin/env python import d then I observe the following at the commandline: pyflakes x.py[4 lines of warnings printed] echo $?4 |
I get the following:
When I get time I'll try using a vanilla checkout from the divmod svn repos to see what their return codes is since one of our distros (yours: Ubuntu/Debian or mine: Arch) may be mucking with the return code. That or some other oddity is going on. |
On my system /usr/bin/pyflakes exits with whatever pyflakes.scripts.pyflakes.main() returns. And main() returns a variable called "warnings" which (except in the case of more serious errors) contains the number of warnings printed (see lines 69-71). |
Sorry for the long delay in responding. I finally got a chance to look into this and it turns out that debian patches pyflakes to behave this way (which by using Ubuntu you get to inherit). Both the pyflakes on my system and the one on the trunk of the Divmod svn repos exit the pyflakes.scripts.pyflakes main() function like so: Then I went to the debian package page (http://packages.debian.org/sid/pyflakes) and there is a patch to pyflakes (http://ftp.de.debian.org/debian/pool/main/p/pyflakes/pyflakes_0.4.0-1.diff.gz) which includes the following change:
So, it looks like I'll have to make the annoying assumption that everyone's pyflakes behaves this way, or attempt to detect this sillyness and handle it as an edge case. |
Closing now that eclim no longer uses pyflakes for validation (switched to pydev). |
In line 65 of .vim/eclim/autoload/eclim/python/validate.vim, an error is issued for any returncode > 1. With the latest pyflakes versions, the value of the returncode is equal to the number of warnings (and errors?) found, which can obviously exceed 1, generating an "error running pyflakes" message when there is no error running it.
The text was updated successfully, but these errors were encountered: