ci/mypy: run checks separately for tools

When directory or files are passed to mypy, it runs the checker on all
of them. Mypy can't deal with name clashes, despite the files / modules
being in different directories, e.g. ./pydnstest vs ./tools/pydnstest.
parent 7f462b3c
Pipeline #44742 passed with stage
in 1 minute and 49 seconds
......@@ -3,11 +3,15 @@ set -o nounset -o errexit
source "$(dirname "$0")/common.sh"
PYFILES=$(find . \
-path ./.git -prune -o \
-path ./contrib -o \
-type d -exec test -e '{}/__init__.py' \; -print -prune -o \
-name '*.py' -print -o \
-type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print)
-path ./.git -prune -o \
-path ./contrib -o \
-path ./tools -prune -o \
-type d -exec test -e '{}/__init__.py' \; -print -prune -o \
-name '*.py' -print -o \
-type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print)
set -e
${PYTHON} -m mypy --ignore-missing-imports ${PYFILES}
# tools
${PYTHON} -m mypy --ignore-missing-imports tools
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment