Pylint

The past few weeks I’ve been exploring Python and related libraries and packages to build an application at work. I’m an old Perl hacker, so Python and it’s strict indentation format limitations really rail on my nerves. But it’s a really powerful language, and all the tools I’m trying to work with support Python or REST APIs.

Friday, I decided the most annoying part of Python programming is it’s inability to detect common mistakes, like typos, and undefined variable names until you actually exercise the code that uses that mistyped variable name.

Back in my C programming language days, we used a program called ‘lint’ to locate obvious errors in source code before running a whole compiler. Friday, I googled python lint, and found out about ‘pylint’, which is exactly what I needed. The default configuration of pylint, enforces a strict coding style I was not used to previously, so it took me a good 5-6 hours to get my software to pass pylint with a minimum of warnings and no errors. but I find it really works well, and helps find all the issues I mostly worry about – not logic issues, I can deal with those, but syntax issues, like lines indented incorrectly (usually due to some extra tab characters where you don’t want them) or simple typos or fat fingers.

Pylint will speed up my app development, I guarantee it.