From cca7d30fadffbf1d15fc5a2655b26f967060f97f Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 4 Mar 2021 13:11:52 -0800 Subject: [PATCH] mypy: Specify mypy_path and cache_dir relative to config path. Previously, these were interpreted relative to the current directory. This was notably causing dozens of extra var/mypy-cache directories to be created in different places when mypy was run from Emacs Flycheck. Use the $MYPY_CONFIG_FILE_DIR variable added in mypy 0.800. Signed-off-by: Anders Kaseorg --- mypy.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mypy.ini b/mypy.ini index fcb7a325af..a54987d0c5 100644 --- a/mypy.ini +++ b/mypy.ini @@ -4,8 +4,8 @@ scripts_are_modules = True show_traceback = True # See https://zulip.readthedocs.io/en/latest/testing/mypy.html#mypy-stubs-for-third-party-modules # for notes on how we manage mypy stubs. -mypy_path = stubs/ -cache_dir = var/mypy-cache +mypy_path = $MYPY_CONFIG_FILE_DIR/stubs +cache_dir = $MYPY_CONFIG_FILE_DIR/var/mypy-cache # Options to make the checking stricter. check_untyped_defs = True