refactor: read declared hashes with one helper

core.hashing.declared_hash_lists gives an entry's declared values per
field in the order written, and declared_hashes builds its sets on it.
The gap page, the doubled-destination report and the file lookup used
their own copies of that reader. The wanted page keeps its filters on
top of it. sitegen.lookup.hash_pairs replaces sorted_hash_values for
the lookup, the data exports and the structured data. The one-field
aliases parse_md5_list and reconcile.hash_values are gone, and
model.profiles reads HASH_FIELDS instead of a fourth tuple.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 10:29:37 +01:00
1 parent ea68e85c06
commit 02969dda06
30 files changed
+176 -195

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ import urllib.parse
from pathlib import Path
from core import upstream
from core.hashing import parse_hash_list, parse_md5_list
from core.hashing import parse_hash_list
from core.paths import EMULATORS_DIR, PLATFORMS_DIR, REPO_ROOT
from resolve.localfile import held_record_for
from resolve.review import load_platform_hashes, load_profile_hashes, placement
@@ -293,7 +293,7 @@ def place_file(
values = [
*parse_hash_list(entry.get("sha1")),
*parse_md5_list(entry.get("md5")),
*parse_hash_list(entry.get("md5")),
*parse_hash_list(entry.get("sha256")),
]
spot = placement(