4

I wrote a nice little script to do some lightweight work. I set it to run all night, and when I eagerly checked it this morning, I found that I had left a module name prefix out of one of its variables. Is there any way to check for this kind of chicanery statically? The trouble is that this thing sleeps a lot, so running it isn't the best way to find out.

asked Nov 4, 2010 at 12:44

2 Answers 2

5

There are three most popular tools: pylint, pyflakes and pycheker.
Pyflakes will show you unused imports, variables, variable usage before assignment, syntax errors and things like that. Pychecker, AFAIK is similar to pyflakes.
Pylint, on the other hand, is a much more comprehensive tool: apart from the listed above, it also checks for PEP8 compatibility, variable names, docstrings, proper indentation, checks for maximum line and module length, number of local variables and class methods and so on. It gives a more or less complete report with a universal score of your code. However, because of the outstanding amount of errors it shows, without proper configuration it is quite tedious to use.

answered Nov 4, 2010 at 12:56
Sign up to request clarification or add additional context in comments.

Comments

4
answered Nov 4, 2010 at 12:46

1 Comment

Note that PyLint ratings are too strict and depend on a lot of things, so don't feel let down by low rankings!

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.