Skip to content

Commit

Permalink
Update changes; fix typing requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
jdidion committed Nov 19, 2017
1 parent 465f5e2 commit 6d2e39e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 4 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
v3.1.2 (2017.11.18)
-------------------
v3.1.3 (dev)
------------

v3.1.2 (2017.11.18)
-------------------
* Added `xphyle.utils.uncompressed_size()`.

v3.1.1 (2017.10.13)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# typing was added in 3.5, and we rely on critical features that were
# introduced in 3.5.2+, so for versions older than 3.6 we rely on
# a backport
install_requirements.append('backports.typing')
install_requirements.append('typing')

import versioneer

Expand Down
6 changes: 2 additions & 4 deletions xphyle/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,9 +884,7 @@ def get_list_command(self, path: str) -> List[str]:
return [str(self.executable_path), '-l', path]

def parse_file_listing(self, listing: str) -> Tuple[int, int, float]:
parsed = re.split(' +', listing.splitlines(keepends=False)[1])
if parsed[0] == '':
parsed = parsed[1:]
parsed = re.split(' +', listing.splitlines(keepends=False)[1].strip())
if self.executable_name != 'pigz':
parsed = parsed[5:8]
ratio = float(parsed[2][:-1]) / 100
Expand Down Expand Up @@ -1075,7 +1073,7 @@ def parse_file_listing(self, listing: str) -> Tuple[int, int, float]:
parsed = listing.splitlines(keepends=False)
print(parsed)
compressed, uncompressed = (
int(re.match('.+?(\d+) B\)?', size).group(1))
int(re.match(r'.+?(\d+) B\)?', size).group(1))
for size in parsed[3:5])
ratio = float(parsed[5][22:])
return (compressed, uncompressed, ratio)
Expand Down

0 comments on commit 6d2e39e

Please sign in to comment.