diff --git a/pylib/tests/run_mypy.py b/pylib/tests/run_mypy.py index 50f40731d..ac4d60f7e 100644 --- a/pylib/tests/run_mypy.py +++ b/pylib/tests/run_mypy.py @@ -4,6 +4,8 @@ import os import subprocess import sys +import tempfile +from pathlib import Path if __name__ == "__main__": (module, ini, extendsitepkgs) = sys.argv[1:] @@ -21,6 +23,9 @@ if __name__ == "__main__": module, "--config-file", ini, + "--cache-dir", + Path(tempfile.gettempdir()) / ".mypy-anki-qt", + "--sqlite-cache", "--python-executable", extendsitepkgs, ] diff --git a/qt/tests/run_mypy.py b/qt/tests/run_mypy.py index 9540781b0..81e83f301 100644 --- a/qt/tests/run_mypy.py +++ b/qt/tests/run_mypy.py @@ -4,6 +4,8 @@ import os import subprocess import sys +import tempfile +from pathlib import Path if __name__ == "__main__": (module, ini, pyqt_init, extendsitepkgs) = sys.argv[1:] @@ -31,6 +33,9 @@ if __name__ == "__main__": module, "--config-file", ini, + "--cache-dir", + Path(tempfile.gettempdir()) / ".mypy-anki-qt", + "--sqlite-cache", "--python-executable", extendsitepkgs, ]