From a64787f7f7c5bede422b70dbdbf8aea874d4b18e Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Mon, 6 Oct 2014 14:33:24 +0200 Subject: [PATCH] Add some previous fixes to pyflakes.sh checks --- tools/pyflakes.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/pyflakes.sh b/tools/pyflakes.sh index 24e46c37..3e975bd3 100755 --- a/tools/pyflakes.sh +++ b/tools/pyflakes.sh @@ -7,6 +7,8 @@ grep -n $'\t\|\s$' $PYFILES && echo 'Error: tabs or trailing whitespace found, r grep -Fn '.setlocale' ${PYFILES} && echo 'Error: do not use setlocale' && exit 5 grep -Fn '__future__ import with_statement' ${PYFILES} && echo 'Error: with_statement useless as we do not support Python 2.5' && exit 6 grep -nE '^[[:space:]]+except [[:alnum:] ]+,[[:alnum:] ]+' ${PYFILES} && echo 'Error: use new "as" way of naming exceptions' && exit 7 +grep -nE "^ *print " ${PYFILES} && echo 'Error: Use the print function' && exit 8 +grep -Fn ".has_key" ${PYFILES} && echo 'Error: Deprecated, use in' && exit 9 FLAKE8="" if which flake8 >/dev/null 2>&1; then