Skip to content

Commit e71b3aa

Browse files
Arm backend: Fix mypy linting in pre-push (#10850)
- 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 <[email protected]>
1 parent 0bb059f commit e71b3aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backends/arm/scripts/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ for COMMIT in ${COMMITS}; do
7676

7777
# lintrunner on latest patches.
7878
echo -e "${INFO} Lintrunner"
79-
lintrunner --revision ${COMMIT}
79+
MYPYPATH=./src/ lintrunner --revision ${COMMIT}^1
8080
if [[ $? != 0 ]]; then
8181
echo -e "${ERROR} Failed linting"
8282
FAILED=1

0 commit comments

Comments
 (0)