From 881ddd736194795a10041968a4b7e292b7e71654 Mon Sep 17 00:00:00 2001 From: Vincent Ardisson Date: Thu, 7 May 2020 11:16:55 +0200 Subject: [PATCH] tools/pyflakes-strict: use $PYTHON3 env variable, like our pyflakes.sh --- tools/pyflakes-strict.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tools/pyflakes-strict.sh b/tools/pyflakes-strict.sh index 86ce4b4349..0725b2ca60 100755 --- a/tools/pyflakes-strict.sh +++ b/tools/pyflakes-strict.sh @@ -1,5 +1,7 @@ #!/bin/sh -e +. "$(dirname $0)/common.sh" + cd "$(dirname $0)/.." die () { @@ -7,15 +9,15 @@ die () { exit 1 } -python3 -c 'import flake8' || die "Please install flake8 (e.g. apt install flake8)" -python3 -c 'import bugbear' || die "Please install flake8-bugbear (e.g. pip3 install flake8-bugbear)" -python3 -c 'import asttokens' || die "Please install asttokens (e.g. apt install python3-asttokens)" +$PYTHON3 -c 'import flake8' || die "Please install flake8 (e.g. apt install flake8)" +$PYTHON3 -c 'import bugbear' || die "Please install flake8-bugbear (e.g. pip3 install flake8-bugbear)" +$PYTHON3 -c 'import asttokens' || die "Please install asttokens (e.g. apt install python3-asttokens)" err=0 -./tools/hooks/run-flake8.py "$@" || err=1 -./tools/hooks/check-ifexpr.py "$@" || err=1 -./tools/hooks/check-stringcut.py "$@" || err=1 -./tools/hooks/check-continuations.py "$@" || err=1 -./tools/hooks/check-trailing-commas.py "$@" || err=1 -./tools/hooks/check-line-length.py -l 120 "$@" || err=1 +$PYTHON3 ./tools/hooks/run-flake8.py "$@" || err=1 +$PYTHON3 ./tools/hooks/check-ifexpr.py "$@" || err=1 +$PYTHON3 ./tools/hooks/check-stringcut.py "$@" || err=1 +$PYTHON3 ./tools/hooks/check-continuations.py "$@" || err=1 +$PYTHON3 ./tools/hooks/check-trailing-commas.py "$@" || err=1 +$PYTHON3 ./tools/hooks/check-line-length.py -l 120 "$@" || err=1 exit $err -- GitLab