[Backport maintenance/4.0.x] Skip mypy install for pypy (#2906)

Skip mypy install for pypy and mypy tests if it's not installed (#2905)

(cherry picked from commit 723c66b9f1cf9b503c88ae794f8a752cfc90db57)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2 files changed