It just runs pyflakes and does some sanity checking. Best of all, it doesn't go around stashing files or otherwise messing with your working directory or repository. It just uses some git plumbing commands to copy the current index (what you're about to commit) to a temporary directory.
I can't remember where I copied it from but it works perfectly, only copying whatever I'm about to commit:
git diff --cached --name-only --diff-filter=ACMR | xargs git checkout-index --prefix=$TMPDIR/ --
I can't say how many times this saved me from leaving a pdb.set_trace() in a view somewhere...