(pkg: ReleaseInfo)
| 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): |
nothing calls this directly
no test coverage detected