From 941b6c7eff72de618bb34eeb5983ed2795988a32 Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Mon, 24 Oct 2016 13:52:45 +0200 Subject: feat(src): subst `reduce` with `sum` for size calcs + fix(loose-db): fix bad-attr in ex-message --- gitdb/fun.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gitdb/fun.py') diff --git a/gitdb/fun.py b/gitdb/fun.py index 8ca38c8..cf3ad02 100644 --- a/gitdb/fun.py +++ b/gitdb/fun.py @@ -12,7 +12,6 @@ decompressobj = zlib.decompressobj import mmap from itertools import islice -from functools import reduce from gitdb.const import NULL_BYTE, BYTE_SPACE from gitdb.utils.encoding import force_text @@ -296,7 +295,7 @@ class DeltaChunkList(list): :raise AssertionError: if the size doen't match""" if target_size > -1: assert self[-1].rbound() == target_size - assert reduce(lambda x, y: x + y, (d.ts for d in self), 0) == target_size + assert sum(d.ts for d in self) == target_size # END target size verification if len(self) < 2: -- cgit v1.2.1