From f9047771d642c5887c752872b6ffbbd974603b35 Mon Sep 17 00:00:00 2001 From: Fabian Jahr Date: Sun, 30 Jul 2023 11:21:41 +0200 Subject: [PATCH] lint: fix custom mypy cache dir setting --- test/lint/lint-python.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/lint/lint-python.py b/test/lint/lint-python.py index 6010c787cb9cd..eabd13322e1e5 100755 --- a/test/lint/lint-python.py +++ b/test/lint/lint-python.py @@ -9,14 +9,17 @@ """ import os +from pathlib import Path import subprocess import sys from importlib.metadata import metadata, PackageNotFoundError +# Customize mypy cache dir via environment variable +cache_dir = Path(__file__).parent.parent / ".mypy_cache" +os.environ["MYPY_CACHE_DIR"] = str(cache_dir) DEPS = ['flake8', 'lief', 'mypy', 'pyzmq'] -MYPY_CACHE_DIR = f"{os.getenv('BASE_ROOT_DIR', '')}/test/.mypy_cache" # All .py files, except those in src/ (to exclude subtrees there) FLAKE_FILES_ARGS = ['git', 'ls-files', '*.py', ':!:src/*.py']