Skip to content

Commit f904777

Browse files
committed
lint: fix custom mypy cache dir setting
1 parent 1d4846a commit f904777

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/lint/lint-python.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
"""
1010

1111
import os
12+
from pathlib import Path
1213
import subprocess
1314
import sys
1415

1516
from importlib.metadata import metadata, PackageNotFoundError
1617

18+
# Customize mypy cache dir via environment variable
19+
cache_dir = Path(__file__).parent.parent / ".mypy_cache"
20+
os.environ["MYPY_CACHE_DIR"] = str(cache_dir)
1721

1822
DEPS = ['flake8', 'lief', 'mypy', 'pyzmq']
19-
MYPY_CACHE_DIR = f"{os.getenv('BASE_ROOT_DIR', '')}/test/.mypy_cache"
2023

2124
# All .py files, except those in src/ (to exclude subtrees there)
2225
FLAKE_FILES_ARGS = ['git', 'ls-files', '*.py', ':!:src/*.py']

0 commit comments

Comments
 (0)