Skip to content

Instantly share code, notes, and snippets.

@andreyshuster
Created July 29, 2014 09:05
Show Gist options
  • Save andreyshuster/1eb5b349443fbd9c9087 to your computer and use it in GitHub Desktop.
Save andreyshuster/1eb5b349443fbd9c9087 to your computer and use it in GitHub Desktop.
pre-commit hook to check pep8
#!/bin/sh
FILES=$(git diff --cached --name-status | grep -v ^D | awk '$1 $2 { print $2}' | grep -e .py$)
if [ -n "$FILES" ]; then
pep8 -r $FILES
fi
@andreyshuster
Copy link
Author

override pre-commit hook with '--no-verify'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment