MCPcopy Index your code
hub / github.com/python/mypy / load_cache

Function load_cache

misc/incremental_checker.py:196–203  ·  view source on GitHub ↗
(incremental_cache_path: str = CACHE_PATH)

Source from the content-addressed store, hash-verified

194
195
196def load_cache(incremental_cache_path: str = CACHE_PATH) -> JsonDict:
197 if os.path.exists(incremental_cache_path):
198 with open(incremental_cache_path) as stream:
199 cache = json.load(stream)
200 assert isinstance(cache, dict)
201 return cache
202 else:
203 return {}
204
205
206def save_cache(cache: JsonDict, incremental_cache_path: str = CACHE_PATH) -> None:

Callers 1

test_repoFunction · 0.85

Calls 2

isinstanceFunction · 0.85
existsMethod · 0.80

Tested by 1

test_repoFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…