Support systems with flake8 for python3 by default
This commit is contained in:
parent
67f1cc4db8
commit
c64fb9150e
1 changed files with 9 additions and 1 deletions
|
|
@ -2,9 +2,17 @@
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
FLAKE8=""
|
||||||
if which flake8 >/dev/null 2>&1; then
|
if which flake8 >/dev/null 2>&1; then
|
||||||
|
FLAKE8=flake8
|
||||||
|
fi
|
||||||
|
if which flake8-python2 >/dev/null 2>&1; then
|
||||||
|
FLAKE8=flake8-python2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${FLAKE8}" ]; then
|
||||||
set -e
|
set -e
|
||||||
flake8 --ignore=E,W *.py weboob modules contrib scripts/*
|
${FLAKE8} --ignore=E,W *.py weboob modules contrib scripts/*
|
||||||
else
|
else
|
||||||
# grep will return 0 only if it founds something, but our script
|
# grep will return 0 only if it founds something, but our script
|
||||||
# wants to return 0 when it founds nothing!
|
# wants to return 0 when it founds nothing!
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue