From a837095326a07d10ad6bbf99c5f2e16b1f9c00d6 Mon Sep 17 00:00:00 2001 From: Robert Gerus <ar@is-a.cat> Date: Wed, 16 Aug 2023 20:57:32 +0200 Subject: [PATCH] tools/mypy: only scan the actual app directory the script was refering to an undefined variable, which made it scan the whole python_payload/apps/ directory. as a side effect the run is ever so slightly faster now, but scanning the whole directory just once would be faster. also added a check against that to the set line on top --- tools/mypy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/mypy.sh b/tools/mypy.sh index 5cb4574e83..d25bd5a76e 100755 --- a/tools/mypy.sh +++ b/tools/mypy.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -e +set -e -u if [ ! -f sdkconfig.defaults ] || [ ! -f recovery/sdkconfig.defaults ]; then echo >/dev/stderr "Run this script for the root of the repository (ie. tools/mypy.sh)." @@ -28,7 +28,7 @@ _mypy python_payload/main.py for f in python_payload/apps/*/flow3r.toml; do app_name="$(basename $(dirname $f))" echo "Checking ${app_name}..." - _mypy python_payload/apps/${app} + _mypy python_payload/apps/${app_name} done if [ $failed ]; then -- GitLab