From 2f49e75143dd01a2e112df660c73aa201297bcc6 Mon Sep 17 00:00:00 2001 From: LDericher <40151420+ldericher@users.noreply.github.com> Date: Wed, 8 Sep 2021 15:24:38 +0200 Subject: [PATCH] type hint/formatting --- fftcgtool/scripts/fftcgtool.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fftcgtool/scripts/fftcgtool.py b/fftcgtool/scripts/fftcgtool.py index ad372a5..6c53e65 100755 --- a/fftcgtool/scripts/fftcgtool.py +++ b/fftcgtool/scripts/fftcgtool.py @@ -126,7 +126,7 @@ def main(ctx, **kwargs) -> None: metavar="[OPUS-ID] ...", ) @click.pass_context -def opuses(ctx, opus_ids, num_requests) -> list[fftcgtool.TTSDeck]: +def opuses(ctx, opus_ids: list[str], num_requests: int) -> list[fftcgtool.TTSDeck]: """ Imports Opuses from the square API and creates its elemental decks as JSON files. @@ -161,7 +161,7 @@ def opuses(ctx, opus_ids, num_requests) -> list[fftcgtool.TTSDeck]: type=str, metavar="[DECK-ID] ...", ) -def ffdecks(deck_ids) -> list[fftcgtool.TTSDeck]: +def ffdecks(deck_ids: list[str]) -> list[fftcgtool.TTSDeck]: """ Imports Decks from the ffdecks.com API and creates it as a JSON file. @@ -183,6 +183,7 @@ def finalize(decks: list[fftcgtool.TTSDeck], **kwargs): # decide what to do with the decks if kwargs["zip"] is not None: logger.debug("Outputting decks to ZIP") + if decks: # create zip file with zipfile.ZipFile(kwargs["zip"], "w", compression=zipfile.ZIP_DEFLATED) as zip_file: