Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit d332f67

Browse files
authored
[cherry-pick][model.download] fix function returning nothing (#420) (#422)
1 parent c9c22e2 commit d332f67

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/sparsezoo/model/model.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -705,23 +705,23 @@ def _download(
705705
)
706706
):
707707
file.download(destination_path=directory_path)
708-
return True
708+
validations = True
709709
else:
710710
_LOGGER.warning(
711711
f"Failed to download file {file.name}. The url of the file is None."
712712
)
713-
return False
713+
validations = False
714714

715715
elif isinstance(file, Recipes):
716-
validations = (
716+
validations = all(
717717
self._download(_file, directory_path) for _file in file.recipes
718718
)
719719

720720
else:
721-
validations = (
721+
validations = all(
722722
self._download(_file, directory_path) for _file in file.values()
723723
)
724-
return all(validations)
724+
return validations
725725

726726
def _sample_outputs_list_to_dict(
727727
self,

0 commit comments

Comments
 (0)