From 708b8dda8e7b87841a5f39c60b799c514e75a9c7 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 11 Oct 2009 21:17:59 +0200 Subject: commit: fixed failing commit tests as the mocked git command would always return the same thing which does not work anymore - re-implemented it in a more dynamic manner, but in the end tests will have to be revised anyway Added slots to Diff and Stats type respectively --- lib/git/stats.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/git/stats.py') diff --git a/lib/git/stats.py b/lib/git/stats.py index a39d1dab..19b1591f 100644 --- a/lib/git/stats.py +++ b/lib/git/stats.py @@ -31,8 +31,9 @@ class Stats(object): files = number of changed files as int """ - def __init__(self, repo, total, files): - self.repo = repo + __slots__ = ("total", "files") + + def __init__(self, total, files): self.total = total self.files = files @@ -56,4 +57,4 @@ class Stats(object): hsh['files'][filename.strip()] = {'insertions': insertions, 'deletions': deletions, 'lines': insertions + deletions} - return Stats(repo, hsh['total'], hsh['files']) + return Stats(hsh['total'], hsh['files']) -- cgit v1.2.1