From cc16926c070dc7d47e9f5ea03c24408ea1476266 Mon Sep 17 00:00:00 2001 From: Adrian Lundell Date: Tue, 13 May 2025 11:45:00 +0200 Subject: [PATCH] Arm backend: Fix mypy linting in pre-push - Adds ./src/ to MYPYPATH to find imports for editable install - Make --revision point to the commit before the commit to be linted. Since lintrunner compares files diffing between --revision and HEAD, pointing it to the the latest commit (== HEAD) results in no files being linted. Signed-off-by: Adrian Lundell Change-Id: Ia7ce8f02e1ae526dce91758bc267cd78f1f40ee6 --- backends/arm/scripts/pre-push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/arm/scripts/pre-push b/backends/arm/scripts/pre-push index 804abbe26a4..9fb54995849 100755 --- a/backends/arm/scripts/pre-push +++ b/backends/arm/scripts/pre-push @@ -76,7 +76,7 @@ for COMMIT in ${COMMITS}; do # lintrunner on latest patches. echo -e "${INFO} Lintrunner" - lintrunner --revision ${COMMIT} + MYPYPATH=./src/ lintrunner --revision ${COMMIT}^1 if [[ $? != 0 ]]; then echo -e "${ERROR} Failed linting" FAILED=1