Skip to content

Instantly share code, notes, and snippets.

@fangpenlin
Created February 5, 2014 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fangpenlin/8820021 to your computer and use it in GitHub Desktop.
Save fangpenlin/8820021 to your computer and use it in GitHub Desktop.
#!/bin/sh
FILES=$(git diff HEAD^ HEAD --name-only --diff-filter=ACM | grep -e '\.py$')
for f in $FILES
do
# auto pep8 correction
autopep8 --in-place --ignore=E309,E501,W293 $f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment