MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / get_checksums

Method get_checksums

etc/scripts/utils_thirdparty.py:790–799  ·  view source on GitHub ↗

Return a mapping of computed checksums for this dist filename is `dest_dir`.

(self, dest_dir=THIRDPARTY_DIR)

Source from the content-addressed store, hash-verified

788 return self.load_about_data(about_data)
789
790 def get_checksums(self, dest_dir=THIRDPARTY_DIR):
791 """
792 Return a mapping of computed checksums for this dist filename is
793 `dest_dir`.
794 """
795 dist_loc = os.path.join(dest_dir, self.filename)
796 if os.path.exists(dist_loc):
797 return multi_checksums(dist_loc, checksum_names=("md5", "sha1", "sha256"))
798 else:
799 return {}
800
801 def set_checksums(self, dest_dir=THIRDPARTY_DIR):
802 """

Callers 2

set_checksumsMethod · 0.95
validate_checksumsMethod · 0.95

Calls 3

multi_checksumsFunction · 0.90
joinMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected