Skip to content

Commit

Permalink
Format files with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Apr 11, 2024
1 parent fa3dd77 commit 44a1d57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
8 changes: 2 additions & 6 deletions wacz/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
)
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions wacz/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -134,5 +135,3 @@ def validate_pages_jsonl_file(json_file_path):
return False

return True


0 comments on commit 44a1d57

Please sign in to comment.