pyflakes.sh: Explicit errors
This commit is contained in:
parent
9ccc3eb338
commit
57d38783b6
2 changed files with 10 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue