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

Function cleanup_locations

aura/uri_handlers/base.py:437–453  ·  view source on GitHub ↗

Iterate over all created locations and delete path tree for those marked with cleanup

()

Source from the content-addressed store, hash-verified

435
436
437def cleanup_locations():
438 """
439 Iterate over all created locations and delete path tree for those marked with cleanup
440 """
441 for obj in ScanLocation.get_instances(): # type: ScanLocation
442 if not obj.cleanup:
443 continue
444 else:
445 obj.do_cleanup()
446
447 for location in CLEANUP_LOCATIONS: # type: Union[Path, ScanLocation]
448 if isinstance(location, ScanLocation):
449 location.do_cleanup()
450
451 elif location.exists():
452 logger.debug(f"Cleaning up {location}")
453 shutil.rmtree(location)
454
455
456def get_diff_depth_limit() -> int:

Callers

nothing calls this directly

Calls 3

get_instancesMethod · 0.80
do_cleanupMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected