diff --git a/src/ome2024_ngff_challenge/resave.py b/src/ome2024_ngff_challenge/resave.py index 022bf53..586f2f1 100755 --- a/src/ome2024_ngff_challenge/resave.py +++ b/src/ome2024_ngff_challenge/resave.py @@ -406,9 +406,10 @@ def write( config.zr_write_text(filename, text) -def main(ns: argparse.Namespace) -> None: +def main(ns: argparse.Namespace) -> int: """ - If no images are converted, raises SystemExit. + If no images are converted, raises + SystemExit. Otherwise, return the number of images. """ converted: int = 0 @@ -549,6 +550,7 @@ def main(ns: argparse.Namespace) -> None: if converted == 0: raise SystemExit(1) + return converted def cli(subparsers: argparse._SubParsersAction):