CI: mypy: make compatible with "pmbootstrap ci" (MR 2258)

This commit is contained in:
Oliver Smith 2024-02-15 21:08:59 +00:00 committed by Newbyte
parent c18bff1c67
commit 2d90b558c1
No known key found for this signature in database
GPG Key ID: 8A700086A9FE41FD
2 changed files with 14 additions and 3 deletions

13
.ci/mypy.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh -e
# Description: static type checking for python scripts
# https://postmarketos.org/pmb-ci
if [ "$(id -u)" = 0 ]; then
set -x
apk -q add py3-argcomplete py3-mypy
exec su "${TESTUSER:-build}" -c "sh -e $0"
fi
set -x
mypy pmbootstrap.py

View File

@ -59,7 +59,5 @@ mr-settings:
mypy:
stage: lint
before_script:
- apk add py3-argcomplete py3-mypy
script:
- mypy pmbootstrap.py
- ".ci/mypy.sh"