diff --git a/tools/make_man.py b/tools/make_man.py index a5ae1a60..71a9ed7f 100755 --- a/tools/make_man.py +++ b/tools/make_man.py @@ -22,11 +22,15 @@ import sys import os import tempfile import imp -import inspect +import inspect import optparse import re import time +class Prout: + pass + + from weboob.tools.application.base import BaseApplication BASE_PATH = os.path.join(os.path.dirname(__file__), os.pardir) diff --git a/tools/pyflakes.sh b/tools/pyflakes.sh index 85b5138e..a8c22060 100755 --- a/tools/pyflakes.sh +++ b/tools/pyflakes.sh @@ -2,11 +2,11 @@ cd $(dirname $0) 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 -Fn '.setlocale' ${PYFILES} && exit 5 -grep -Fn '__future__ import with_statement' ${PYFILES} && exit 6 -grep -nE 'except [[:alnum:] ]+,[[:alnum:] ]+' ${PYFILES} && exit 7 +grep -n 'class [^( ]\+:$' ${PYFILES} && echo 'Error: old class style found, always inherit object' && exit 3 +grep -n $'\t\|\s$' $PYFILES && echo 'Error: tabs or trailing whitespace found, remove them' && exit 4 +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 'except [[:alnum:] ]+,[[:alnum:] ]+' ${PYFILES} && echo 'Error: use new "as" way of naming exceptions' && exit 7 FLAKE8="" if which flake8 >/dev/null 2>&1; then