Clarify empty extra-info logging

This commit is contained in:
2026-06-29 11:26:48 +08:00
parent d4a29063d6
commit ca294193f4
3 changed files with 13 additions and 2 deletions

View File

@@ -87,6 +87,15 @@ def load_extra_info_types_file(path: str) -> list[int]:
raise ValueError(f"Invalid extra info type id in {path}") from exc
def format_extra_info_types(extra_info_types: Iterable[int] | None) -> str:
if extra_info_types is None:
return "all"
values = [int(x) for x in extra_info_types]
if not values:
return "none"
return str(values)
def load_eid_file(path: str | Path) -> set[int]:
file_path = Path(path)
if not file_path.is_file():