From 4c56a352e7f77bdd74b28d58df6effefa0da3e77 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Wed, 26 Mar 2025 09:02:32 +0100 Subject: [PATCH] added default parameter to keep or not the "Was still being processed" item from the backup (to delegate to the caller if he wants it) --- dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dataset.py b/dataset.py index a6e1ebd..5bfdbea 100644 --- a/dataset.py +++ b/dataset.py @@ -40,7 +40,7 @@ class Dataset: json.dump(self, f, default=lambda o: o.__dict__, indent=4) @staticmethod - def from_json(filename: str) -> "Dataset": + def from_json(filename: str, keep_still_in_progress: bool = False) -> "Dataset": with open(filename) as f: data = json.load(f) @@ -51,7 +51,7 @@ class Dataset: print(f"Warning: missing commented_file in metadata in entry {metadata_data['repo']}/{metadata_data['pr_number']}") print(metadata_data.keys()) metadata = Metadata(**metadata_data) - if metadata.reason_for_failure == "Was still being processed": + if not keep_still_in_progress and metadata.reason_for_failure == "Was still being processed": continue files = {