python + django: pre-commit hook allows some leeway