Commit a59f358f authored by Laurent Bachelier's avatar Laurent Bachelier

Better pyflakes.sh using flake8 if possible

from weboob
parent f2abf2ba
#!/bin/sh
#!/bin/bash -u
cd $(dirname $0)
cd ..
# grep will return 0 only if it finds something, but our script
# wants to return 0 when it finds nothing!
pyflakes ass2m | grep -v redefinition && exit 1 || exit 0
if which flake8 >/dev/null 2>&1; then
set -e
flake8 --ignore=E,W *.py ass2m tests bin/*
else
# grep will return 0 only if it founds something, but our script
# wants to return 0 when it founds nothing!
pyflakes *.py ass2m tests bin/* | grep -v redefinition && exit 1 || exit 0
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment