MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / get_cached_location

Method get_cached_location

aura/package.py:265–279  ·  view source on GitHub ↗
(pkg: ReleaseInfo)

Source from the content-addressed store, hash-verified

263 location_cache = {}
264 # Inline cache function as we want this to be temporary within the function scope only
265 def get_cached_location(pkg: ReleaseInfo) -> ScanLocation:
266 if pkg["url"] not in location_cache:
267 pkg_path = temp_dir / pkg["md5_digest"]
268 pkg_path.mkdir()
269 pkg_path /= pkg["filename"]
270
271 with pkg_path.open("wb") as fd:
272 cache.FileDownloadCache.proxy(url=pkg["url"], fd=fd)
273
274 location_cache[pkg["url"]] = ScanLocation(
275 location=pkg_path,
276 strip_path=str(pkg_path.parent),
277 metadata={"release": pkg, "report_imports": True}
278 )
279 return location_cache[pkg["url"]]
280
281 try:
282 for (x, y) in self.get_diff_candidates(other):

Callers

nothing calls this directly

Calls 2

ScanLocationClass · 0.85
proxyMethod · 0.45

Tested by

no test coverage detected