Skip to content

Commit

Permalink
Update precommit hook's max line length.
Browse files Browse the repository at this point in the history
It appears that we are working with a max line length of 100. If that's
case, let's update the pre-commit file to reflect that (instead of 120).
  • Loading branch information
enetor committed Jun 30, 2017
1 parent 5245e12 commit ba4cd81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ which >/dev/null pep8 || (echo "please install pep8"; exit 1)
files=$(git diff --name-only --staged --diff-filter=ACMRTUXB | egrep "*.py$")

if test -n "$files"; then
pep8 --max-line-length=120 $files
pep8 --max-line-length=100 $files
res=$?
if [ $res -ne 0 ]; then
echo
autopep8 --max-line-length=120 --diff $files
autopep8 --max-line-length=100 --diff $files
echo
echo "To fix run: autopep8 --max-line-length=120 -i $files"
echo "To fix run: autopep8 --max-line-length=100 -i $files"
fi
exit $res
fi

0 comments on commit ba4cd81

Please sign in to comment.