Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! Issue #20 Initial implementation of zip l…
Browse files Browse the repository at this point in the history
…isting support
  • Loading branch information
soxofaan committed Oct 10, 2022
1 parent f70d804 commit 8aa78d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions duviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def pairs(listing: Iterator[str]) -> Iterator[Tuple[List[str], int]]:
mo = row_regex.match(line)
if not mo:
raise ZipListingParseException(
f"Failed to parse zip listing line {line}".format(line=line)
"Failed to parse zip listing line {line}".format(line=line)
)
size, path = mo.group(1, 2)
yield path_split(path), int(size)
Expand All @@ -239,7 +239,7 @@ def pairs(listing: Iterator[str]) -> Iterator[Tuple[List[str], int]]:
mo = re.match(r"^Archive:\s*(.+)$", archive_line)
if not mo:
raise ZipListingParseException(
"Failed to parse Archive name from {archive_line}."
"Failed to parse archive name from {archive_line}."
)
archive_name = mo.group(1)

Expand All @@ -253,7 +253,7 @@ def pairs(listing: Iterator[str]) -> Iterator[Tuple[List[str], int]]:
header_separator_regex = re.compile(r"^[- ]+$")
if not header_separator_regex.match(header_separator):
raise ZipListingParseException(
f"Unexpected table separator {header_separator}."
"Unexpected table separator {header_separator}."
)

tree = SizeTree.from_path_size_pairs(pairs=pairs(listing), root=archive_name)
Expand Down

0 comments on commit 8aa78d1

Please sign in to comment.