From 44a1d574177c02ee4a4668e85b7528f1b0ecfcbf Mon Sep 17 00:00:00 2001 From: Tessa Walsh Date: Thu, 11 Apr 2024 14:59:23 -0400 Subject: [PATCH] Format files with Black --- wacz/main.py | 8 ++------ wacz/util.py | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/wacz/main.py b/wacz/main.py index 927cf85..057c44d 100644 --- a/wacz/main.py +++ b/wacz/main.py @@ -115,11 +115,7 @@ def main(args=None): if cmd.cmd == "create" and cmd.ts is not None and cmd.url is None: parser.error("--url must be specified when --ts is passed") - if ( - cmd.cmd == "create" - and cmd.detect_pages is not False - and cmd.pages is not None - ): + if cmd.cmd == "create" and cmd.detect_pages is not False and cmd.pages is not None: parser.error( "--pages and --detect-pages can't be set at the same time they cancel each other out." ) @@ -199,7 +195,7 @@ def create_wacz(res): with wacz.open(pages_jsonl, "w") as pages_file: shutil.copyfileobj(fh, pages_file) - else: + else: print("Validating passed pages.jsonl file") passed_content = [] with open(res.pages, "rb") as fh: diff --git a/wacz/util.py b/wacz/util.py index ce8b276..3b1dd4f 100644 --- a/wacz/util.py +++ b/wacz/util.py @@ -108,6 +108,7 @@ def validateJSON(jsonData): return False return True + def validate_pages_jsonl_file(json_file_path): """Attempt to validate pages.jsonl file""" filename = os.path.basename(json_file_path) @@ -134,5 +135,3 @@ def validate_pages_jsonl_file(json_file_path): return False return True - -