Work around code duplication warning in pylint

Use `find` to sort scripts/abi_check.py into a separate invocation of pylint.

Signed-off-by: Bence Szépkúti <[email protected]>
This commit is contained in:
Bence Szépkúti
2025-12-18 20:20:25 +01:00
parent f9c2d65909
commit 5066f2cbf9
+7 -1
View File
@@ -55,7 +55,13 @@ elif [ "$1" = "--can-mypy" ]; then
fi
echo 'Running pylint ...'
$PYTHON -m pylint framework/scripts/*.py framework/scripts/mbedtls_framework/*.py scripts/*.py tests/scripts/*.py || {
# Temporary workaround while moving the bulk of abi_check.py to the framework
# Check abi_check.py separately from the rest of the files, so it's not flagged
# for code duplication.
find framework/scripts/*.py framework/scripts/mbedtls_framework/*.py scripts/*.py tests/scripts/*.py \
-path scripts/abi_check.py \
-exec $PYTHON -m pylint {} + \
-o -exec $PYTHON -m pylint {} + || {
echo >&2 "pylint reported errors"
ret=1
}