I thought it would be helpful if there was a PEP8 coding conventions checker in PyDev.
An interface similar to the PyLint interface seems well-fitting. (Info, Warning, Error notifications with a jump-to-line interface)
There is already a PEP8 checker at cheesecake.org:
I'm sure there will be some python-modification there will be have to be done on this code, which I'll gladly perform, I just don't know what they are yet.
Please add that as a feature request...
It would be nice if someone was able to get this request (the integration should be easy -- and is pretty similar to the PyLint integration).
A nice thing (which would make it faster) is if it could run as Jython and not only python (so, it could be run from inside of pydev, which would make it much faster when compared to spawning shells to do that check).
I've examined the issue a bit, and the in order to run the pep8.py file as is in jython, there are two python modules that need to be converted to Jython: optparse and textwrap.
I looked at the Jython site, and they say to mail them if I want to ask to insert a module into Jython. However, I didn't see a mail address. Do they mean the Dev-Jython mailing list? (Except of recognizing the name and a general knowledge of the project, my first encounter to Jython was about 2 hours ago...)
Also, I've brute-forcefully copied my CPython 2.5 optparse.py and textwrap.py files to the Jython folder and tried to run the PEP8 script on some python files I have. It seems to work, and the results are identical to the run with CPython. Of course, this is not the way to work, but it was a kind of a sanity test.
Actually, as it'll be integrated in the jython inside of pydev, if the default optparse.py and textwrap.py from python work, it should be OK (pydev still uses jython 2.1 internally, so, even if jython was updated, that wouldn't make such a difference... unless those modules require a newer version of jython).
The jython that pydev uses is located at plugins/org.python.pydev.jython
I've tested pep8.py under the pydev version of jython (2.1), and on the newest version (2.2.1) and found the following:
1. There are three missing modules:
* optparse, textwrap - those were copied from my python25\Lib and worked fine.
* inspect - a module not available in the 2.1 version of jython, but available in
the 2.2.1 version.
2. inspect uses the // operator, which was added to jython only in version 2.2., so the
didn't pass under python 2.1.
3. If I run the pep.py test under jython 2.2.1 with the optparse and textwrap modules copied from my python25\Lib, all works fine.
So, we could run the pep8.py from pydev's, but after an upgrade to jython 2.2, or greater.
There is another option, to change the inspect module's code.
What do you think?
BugoK - are you still interested in this?
fabioz - what's the current state and plans for future?
Yes, still interested.
Would it be possible to configure PyLint (which is already integrated with PyDev) to perform the same checks as PEP8 does?
I asked the question from my previous post (8) at