Skip to content

Commit f8f8091

Browse files
committed
Remove spurious colon on hash strings
1 parent 35a939b commit f8f8091

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/obelisk/filetypes/binary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_metadata_from_binary(file_path: Path) -> ManifestEntry | None:
1616
file_size = file_path.stat().st_size
1717

1818
# Construct the manifest entry
19-
hash_str = f'md5:{hasher.hexdigest()}:{file_size}:'
19+
hash_str = f'md5:{hasher.hexdigest()}:{file_size}'
2020
return ManifestEntry(
2121
filename=file_path.name,
2222
hash=hash_str,

tests/unit/filetypes/test_binary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
def _expected_hash(data: bytes) -> str:
1414
h = hashlib.md5() # noqa: S324 - not using for cryptography in any way
1515
h.update(data)
16-
return f'md5:{h.hexdigest()}:{len(data)}:'
16+
return f'md5:{h.hexdigest()}:{len(data)}'
1717

1818

1919
def test_get_metadata_from_binary_empty_file(tmp_path: Path) -> None:

tests/unit/test_scanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
def _expected_hash(data: bytes) -> str:
1717
h = hashlib.md5() # noqa: S324 - not for cryptography
1818
h.update(data)
19-
return f'md5:{h.hexdigest()}:{len(data)}:'
19+
return f'md5:{h.hexdigest()}:{len(data)}'
2020

2121

2222
def test_create_manifest_from_folder_basic_and_skips(tmp_path: Path) -> None:

0 commit comments

Comments
 (0)