refactor: read the asset registry with one parser

generate_pack kept a private .gitignore parser whose cache ignored the
root it was asked about, and generate_db a copy of the shared one. Both
now read largefiles.load_registered_paths, cached per root. Test modules
whose main block preceded their last class end with it again.
This commit is contained in:
Abdessamad Derraz committed 2026-10-17 19:35:42 +02:00
1 parent 0754d3b64f
commit 18e61fabcb
6 files changed
+57 -51

No files matched your search

+3 -8
View File
@@ -271,14 +271,9 @@ def save_cache(cache_path: str, cache: dict) -> None:
def _load_gitignored_large_files() -> set[str]:
"""The bios/ paths .gitignore registers as release assets."""
gitignore = Path(".gitignore")
if not gitignore.exists():
return set()
return {
line.strip()
for line in gitignore.read_text().splitlines()
if line.strip().startswith("bios/")
}
from largefiles import load_registered_paths
return set(load_registered_paths(".gitignore"))
def _restore(cached: str, path: str) -> None: