diff options
author | Sergei Trofimov <sergei.trofimov@arm.com> | 2018-07-05 10:46:47 +0100 |
---|---|---|
committer | Marc Bonnici <marc.bonnici@arm.com> | 2018-07-06 14:39:41 +0100 |
commit | 651adaaa573d4925551459e9d9e567eea5980949 (patch) | |
tree | c7eff2afcd33b1976c075db4462716b343f11e3d /dev_scripts/pep8 | |
parent | dbea1d7d097ef4977ae374635420a176042fb2b3 (diff) |
dev_scripts: switch from pep8 to flake8
The pep8 code checker is deprecated and will be removed in the future.
Switch to using its successor, flake8.
Also, add a couple of more entries to ignored exceptions.
Diffstat (limited to 'dev_scripts/pep8')
-rwxr-xr-x | dev_scripts/pep8 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/dev_scripts/pep8 b/dev_scripts/pep8 index a74f6f19..b2ab107c 100755 --- a/dev_scripts/pep8 +++ b/dev_scripts/pep8 @@ -4,12 +4,12 @@ DEFAULT_DIRS=( wa ) -EXCLUDE=wa/tests +EXCLUDE=wa/tests,wa/framework/target/descriptor.py EXCLUDE_COMMA= -IGNORE=E501,E265,E266,W391,E401,E402,E731 +IGNORE=E501,E265,E266,W391,E401,E402,E731,W504,W605,F401 -if ! hash pep8 2>/dev/null; then - echo "pep8 not found in PATH" +if ! hash flake8 2>/dev/null; then + echo "flake8 not found in PATH" echo "you can install it with \"sudo pip install pep8\"" exit 1 fi @@ -18,11 +18,11 @@ if [[ "$1" == "" ]]; then THIS_DIR="`dirname \"$0\"`" pushd $THIS_DIR/.. > /dev/null for dir in "${DEFAULT_DIRS[@]}"; do - pep8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE $dir + flake8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE $dir done - pep8 --exclude=$EXCLUDE --ignore=$IGNORE,E241 $(echo "$EXCLUDE_COMMA" | sed 's/,/ /g') + flake8 --exclude=$EXCLUDE --ignore=$IGNORE,E241 $(echo "$EXCLUDE_COMMA" | sed 's/,/ /g') popd > /dev/null else - pep8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE $1 + flake8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE $1 fi |