Skip to content

Commit 9291d34

Browse files
committed
add comment
Signed-off-by: laurentsimon <[email protected]>
1 parent a1d7d7f commit 9291d34

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

model_signing/serialize.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def _task_v2(task_info: any) -> bytes:
340340
# Only files are recorded.
341341
if ty != "file":
342342
raise ValueError(f"internal: got a non-file path {name}")
343-
343+
344344
return Hasher._node_file_compute_v1(name,
345345
b'', start_pos, end_pos, chunk)
346346

@@ -369,6 +369,7 @@ def _to_path_metadata(task_info: [any], all_hashes: bytes) -> [PathMetadata]:
369369
if prev_i < len(task_info):
370370
h = hashlib.sha256(bytes(all_hashes[prev_i:])).digest()
371371
paths += [PathMetadata(prev_name, Hashed(DigestAlgorithm.SHA256_P1, h))]
372+
# TODO: Test this function properly.
372373
# paths += [PathMetadata("path/to/file1", Hashed(DigestAlgorithm.SHA256_P1, b'\abcdef1'))]
373374
# paths += [PathMetadata("path/to/file2", Hashed(DigestAlgorithm.SHA256_P1, b'\abcdef2'))]
374375
return paths

0 commit comments

Comments
 (0)