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

Function read_plugins_snapshot

mypy/build.py:1737–1750  ·  view source on GitHub ↗

Read cached snapshot of versions and hashes of plugins from previous run.

(manager: BuildManager)

Source from the content-addressed store, hash-verified

1735
1736
1737def read_plugins_snapshot(manager: BuildManager) -> dict[str, str] | None:
1738 """Read cached snapshot of versions and hashes of plugins from previous run."""
1739 snapshot = _load_json_file(
1740 PLUGIN_SNAPSHOT_FILE,
1741 manager,
1742 log_success="Plugins snapshot (cached) ",
1743 log_error="Could not load plugins snapshot: ",
1744 )
1745 if snapshot is None:
1746 return None
1747 if not isinstance(snapshot, dict):
1748 manager.log(f"Could not load plugins snapshot: cache is not a dict: {type(snapshot)}") # type: ignore[unreachable]
1749 return None
1750 return snapshot
1751
1752
1753def read_quickstart_file(

Callers 1

__init__Method · 0.85

Calls 4

_load_json_fileFunction · 0.85
isinstanceFunction · 0.85
typeClass · 0.85
logMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…