I've always been a fan of using -Wall -Werror
when programming C and also tools such as flint and splint.
For some reason, despite coding Python since back in the 1.5
days, I had never really used a similar tool for Python.
This is where pylint comes in. This is a fantastic tool that helps find code that is likely to fail, and helps you adhere to coding standards.
pylint divides the things it checks into:
The project webpage has a full list of checks that pylint performs.
One of the really neat things I found from pylint is that it will test code paths that you test cases might not cover, (which isn't to say your test cases should have complete coverage), this is great when you have a dynamic language. It still won't give you the kind of guarentees you get from type checking, but it goes a long way to finding most stupid bugs.
I've found that the things that it has picked up for me has mostly been convention and warnings about missing docstrings, which is great. I think these are important things, but I often forget to follow them and am definately too lazy to manually check my code for this kind of thing. Pylint provides a check crutch to lean on, which in the end produces better, more readable code, with less effort on my end, which is what any good tool should do. The other great thing is that it is configurable so you can enable to tests you think are important, and tweak the parameters of other tests. I definately recommend using it to any who uses python on a regular (or irregular) basis.