MCPcopy
hub / github.com/psf/black / hash_digest

Method hash_digest

src/black/cache.py:88–92  ·  view source on GitHub ↗

Return hash digest for path.

(path: Path)

Source from the content-addressed store, hash-verified

86
87 @staticmethod
88 def hash_digest(path: Path) -> str:
89 """Return hash digest for path."""
90
91 data = path.read_bytes()
92 return hashlib.sha256(data).hexdigest()
93
94 @staticmethod
95 def get_file_data(path: Path) -> FileData:

Callers 3

get_file_dataMethod · 0.80
is_changedMethod · 0.80

Calls

no outgoing calls

Tested by 1