Based on pep8-git-hook.
Every staged Python file will be checked.
Installation:
- Install the pycodestyle (formally called pep8) program:
$ pip install pycodestyle
- Save pre-commit as your_project/.git/hooks/pre-commit
- Mark pre-commit executable:
$ chmod +x your_project/.git/hooks/pre-commit
The hook can be overridden: $ git commit --no-verify