File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ def run_testcases(
175175 else :
176176 configurations = mypy_configuration_from_distribution (package .name )
177177
178- with temporary_mypy_config_file (configurations ) as temp :
178+ with temporary_mypy_config_file (configurations ) as temp_config , tempfile . TemporaryDirectory () as temp_cache_dir :
179179
180180 # "--enable-error-code ignore-without-code" is purposefully omitted.
181181 # See https://github.com/python/typeshed/pull/8083
@@ -189,10 +189,14 @@ def run_testcases(
189189 "--strict" ,
190190 "--pretty" ,
191191 "--config-file" ,
192- temp .name ,
192+ temp_config .name ,
193193 # Avoid race conditions when reading the cache
194194 # (https://github.com/python/typeshed/issues/11220)
195195 "--no-incremental" ,
196+ # Avoid race conditions even harder
197+ # https://github.com/python/mypy/issues/13916
198+ "--cache-dir" ,
199+ temp_cache_dir ,
196200 # Not useful for the test cases
197201 "--disable-error-code=empty-body" ,
198202 ]
You can’t perform that action at this time.
0 commit comments