From 86e06bf0565e29f3389caec09bdd1b5e25452ebd Mon Sep 17 00:00:00 2001 From: Mihai Maruseac Date: Mon, 27 May 2024 19:50:42 -0700 Subject: [PATCH] More ergonomic `verify` API Signed-off-by: Mihai Maruseac --- model_signing/manifest/manifest.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/model_signing/manifest/manifest.py b/model_signing/manifest/manifest.py index 99c94ed4..aefd0e85 100644 --- a/model_signing/manifest/manifest.py +++ b/model_signing/manifest/manifest.py @@ -160,8 +160,11 @@ def extract_from_untrusted(file: pathlib.Path) -> Self: pass @abstractmethod - def verify(self, objects: list[ManifestItem]) -> bool: - """Verifies the integrity of the given objects and any constraints.""" + def verify(self, only_for_objects: list[ManifestItem]) -> bool: + """Verifies the integrity of the given objects and any constraints. + + If the list of objects is empty, validate all hashes for all objects. + """ pass @abstractmethod