Automatically reject buggy pushes with git hooks.
stavros.io
stavros.io
Obviously not a worry if you know your sources or your project isn't open to all. It's just that with something like this set up, it would be tempting to use it to pre-filter changes before you do a 'proper' review of the code, and by that time it's too late...
PS. Don't do this, ensuring test success is one thing. Requiring PEP8 validation is dumb.
I do agree that pre-commit isn't the best choice though. I prefer update hooks; I find they are simpler to write and easier to read.