From 5066f2cbf952996eb9f2631987d06db180eb3075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Sz=C3=A9pk=C3=BAti?= Date: Fri, 12 Dec 2025 17:43:47 +0100 Subject: [PATCH] Work around code duplication warning in pylint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use `find` to sort scripts/abi_check.py into a separate invocation of pylint. Signed-off-by: Bence Szépkúti --- scripts/check-python-files.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/check-python-files.sh b/scripts/check-python-files.sh index 171f8a961..59e3152aa 100755 --- a/scripts/check-python-files.sh +++ b/scripts/check-python-files.sh @@ -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 }