diff --git a/tools/flake8wrap.sh b/tools/flake8wrap.sh index c7478ac484ac..367bbaf33cb0 100755 --- a/tools/flake8wrap.sh +++ b/tools/flake8wrap.sh @@ -11,15 +11,10 @@ if test "x$1" = "x-HEAD" ; then shift - files=$(git diff --name-only HEAD~1 | tr '\n' ' ') + files=$(git diff --name-only HEAD~1 | grep '.py$' | tr '\n' ' ') echo "Running flake8 on ${files}" echo "" - echo "Consider using the 'pre-commit' tool instead." - echo "" - echo " pip install --user pre-commit" - echo " pre-commit install --allow-missing-config" - echo "" - diff -u --from-file /dev/null ${files} | flake8 --diff "$@" + flake8 "$@" $files else echo "Running flake8 on all files" echo ""