MCS cert identified by evidence_category in get_core_file_type 🟩

This commit is contained in:
Daniel Roth 2026-06-02 14:21:58 +00:00 committed by Jun-te Kim
parent 1af1d4a82c
commit e18c300deb

View file

@ -40,6 +40,9 @@ _CORE_FILE_TO_FILE_TYPE: dict[CoreFiles, str] = {
def get_core_file_type(
filename: str, evidence_category: Optional[str] = None
) -> Optional[CoreFiles]:
if evidence_category is not None and evidence_category.lower() == "mcs compliance certificate":
return CoreFiles.MCS_CERTIFICATE
# Identify retrofit design doc using evidence category as the name is possibly unreliable.
# We might change to always use evidence category, but needs more investigation
if evidence_category is not None and evidence_category.lower() == "retrofit design":
@ -74,7 +77,7 @@ def get_core_file_type(
def get_file_type_string(
filename: str, evidence_category: Optional[str] = None
) -> Optional[str]:
core_file: Optional[CoreFiles] = get_core_file_type(filename)
core_file: Optional[CoreFiles] = get_core_file_type(filename, evidence_category)
if core_file is None:
return None