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

Function combine_stats

misc/incremental_checker.py:290–299  ·  view source on GitHub ↗
(overall_stats: dict[str, float], new_stats: dict[str, Any])

Source from the content-addressed store, hash-verified

288
289
290def combine_stats(overall_stats: dict[str, float], new_stats: dict[str, Any]) -> dict[str, float]:
291 INTERESTING_KEYS = ["build_time", "gc_time"]
292 # For now, we only support float keys
293 relevant_stats: dict[str, float] = {}
294 for key in INTERESTING_KEYS:
295 if key in new_stats:
296 value = float(new_stats[key])
297 relevant_stats[key] = value
298 overall_stats[key] = overall_stats.get(key, 0.0) + value
299 return relevant_stats
300
301
302def cleanup(temp_repo_path: str, mypy_cache_path: str) -> None:

Callers 1

test_incrementalFunction · 0.85

Calls 2

floatClass · 0.85
getMethod · 0.45

Tested by 1

test_incrementalFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…