PyLint
I’m relatively new to Python, so I’m trying my best to develop good habits while coding. For example, I’ve read through PEP 8 and have been attempting to adhere to it’s style guidelines. Switching to Komodo from nano has helped, but now I’ve found another tool.
It’s called Pylint (similar to lint):
Pylint is a python tool that checks if a module satisfy a coding standard. Pylint can be seen as another PyChecker since nearly all tests you can do with PyChecker can also be done with Pylint. But Pylint offers some more features, like checking line-code’s length, checking if variable names are well-formed according to your coding standard, or checking if declared interfaces are truly implemented, and much more.
Sure, it checks for syntax/logical errors, which is nice (but Komodo nicer). But it’s the style checks and ultimate quality rating that are interesting to me. I ran it against some of my Python Challenge solutions, and it was giving me a 6 to 7 out of 10. Lots of room for improvement.
My goal is to make all of my code quite tasty indeed. :)
January 9th, 2006 at 9:27 pm
Great post! I’m just in similar situation: got new Komodo license (Thanks to you John :-), have started to develop my own Python modules and release them to others, etc.
So, I’d like to provide consistent and clean software.
Here is what I found some days ago:
http://www.syntext.com/books/syntext-py-conventions.htm
But now I think I’m moving to PEP 8 + Pylint :-)
January 9th, 2006 at 9:35 pm
Glad you found the post to be helpful. You might want to look into PyFlakes and PyChecker as well.
January 14th, 2006 at 6:45 am
I wonder if there is anyone who managed to integrate PyLint to Komodo. It could be nice gadget. Unfortunately, there is nothing in ActiveState lists archives about such integration.
January 14th, 2006 at 1:12 pm
Komodo integration would be awesome. If you figure something out, please let me know!
January 15th, 2006 at 3:28 am
Here it comes:
http://mateusz.loskot.net/2006/01/15/running-pylint-from-komodo/
Comments are welcome.
January 15th, 2006 at 8:18 pm
[...] A while back, I posted a link to PyLint and mentioned (in the comments) that it would be cool to be able to run it from Komodo. Well, Mateusz Łoskot posted to the Komodo list and, after a little experimentation, was able to figure out how to get it to work! [...]