MCPcopy Create free account
hub / github.com/FastLED/FastLED / read

Method read

ci/util/fingerprint.py:86–103  ·  view source on GitHub ↗
(self, name: str)

Source from the content-addressed store, hash-verified

84 return self.fingerprint_dir / f"{name}.json"
85
86 def read(self, name: str) -> Optional[FingerprintResult]:
87 fingerprint_file = self._get_fingerprint_file(name)
88 if fingerprint_file.exists():
89 with open(fingerprint_file, "r") as f:
90 try:
91 data = json.load(f)
92 return FingerprintResult(
93 hash=data.get("hash", ""),
94 elapsed_seconds=data.get("elapsed_seconds"),
95 status=data.get("status"),
96 num_tests_run=data.get("num_tests_run"),
97 num_tests_passed=data.get("num_tests_passed"),
98 duration_seconds=data.get("duration_seconds"),
99 test_name=data.get("test_name"),
100 )
101 except json.JSONDecodeError:
102 ts_print(f"Invalid {name} fingerprint file. Recalculating...")
103 return None
104
105 def write(self, name: str, fingerprint: FingerprintResult) -> None:
106 fingerprint_file = self._get_fingerprint_file(name)

Callers 15

checkMethod · 0.95
_mtime_fast_pathMethod · 0.95
build_libraryFunction · 0.45
compute_content_hashFunction · 0.45
mainFunction · 0.45
install_esbuildFunction · 0.45
hash_input_filesFunction · 0.45
_compute_file_hashFunction · 0.45
mainFunction · 0.45
parse_depfileFunction · 0.45

Calls 5

_get_fingerprint_fileMethod · 0.95
FingerprintResultClass · 0.90
ts_printFunction · 0.90
loadMethod · 0.45
getMethod · 0.45

Tested by 15

parse_testlogFunction · 0.36
send_rpcFunction · 0.36
send_rpcFunction · 0.36
send_rpcFunction · 0.36
send_rpcFunction · 0.36
check_fileMethod · 0.36