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

Function read_quickstart_file

mypy/build.py:1753–1770  ·  view source on GitHub ↗
(
    options: Options, stdout: TextIO
)

Source from the content-addressed store, hash-verified

1751
1752
1753def read_quickstart_file(
1754 options: Options, stdout: TextIO
1755) -> dict[str, tuple[float, int, str]] | None:
1756 quickstart: dict[str, tuple[float, int, str]] | None = None
1757 if options.quickstart_file:
1758 # This is very "best effort". If the file is missing or malformed,
1759 # just ignore it.
1760 raw_quickstart: dict[str, Any] = {}
1761 try:
1762 with open(options.quickstart_file, "rb") as f:
1763 raw_quickstart = json_loads(f.read())
1764
1765 quickstart = {}
1766 for file, (x, y, z) in raw_quickstart.items():
1767 quickstart[file] = (x, y, z)
1768 except Exception as e:
1769 print(f"Warning: Failed to load quickstart file: {str(e)}\n", file=stdout)
1770 return quickstart
1771
1772
1773def read_deps_cache(manager: BuildManager, graph: Graph) -> dict[str, FgDepMeta] | None:

Callers 1

__init__Method · 0.85

Calls 5

json_loadsFunction · 0.90
printFunction · 0.85
strClass · 0.85
readMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…