From 1025f71eb960c8f1030b635adabd69fe971cdec1 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Sat, 27 Jul 2013 15:17:47 +0200 Subject: [PATCH] pyflakes.sh: Ban more stuff --- tools/pyflakes.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/pyflakes.sh b/tools/pyflakes.sh index 795c975c..85b5138e 100755 --- a/tools/pyflakes.sh +++ b/tools/pyflakes.sh @@ -4,7 +4,9 @@ cd .. PYFILES=$(git ls-files|grep '^scripts\|\.py$'|grep -v boilerplate_data|tr '\n' ' ') grep -n 'class [^( ]\+:$' ${PYFILES} && exit 3 grep -n $'\t\|\s$' $PYFILES && exit 4 -grep -n '\.setlocale' ${PYFILES} && exit 5 +grep -Fn '.setlocale' ${PYFILES} && exit 5 +grep -Fn '__future__ import with_statement' ${PYFILES} && exit 6 +grep -nE 'except [[:alnum:] ]+,[[:alnum:] ]+' ${PYFILES} && exit 7 FLAKE8="" if which flake8 >/dev/null 2>&1; then