From 366d5ca9e3620d9cd86003cc70f0aea18f9a1bf4 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 10 Dec 2021 10:46:38 +1000 Subject: [PATCH] experiment with mypy cache Speeds things up in the small change case; remains to be seen whether this will be robust or will introduce caching issues or other problems. --- pylib/tests/run_mypy.py | 5 +++++ qt/tests/run_mypy.py | 5 +++++ 2 files changed, 10 insertions(+) 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, ]