diff options
author | Michael Trier <mtrier@gmail.com> | 2010-03-03 23:46:23 -0500 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2010-03-03 23:46:23 -0500 |
commit | e3e2c8c14b861b4d4865a9574e812ef9f2609771 (patch) | |
tree | c71c7da3843389ea3b7041a0200d7abe3b0e580d /lib/git/stats.py | |
parent | acb0fa8b94ef421ad60c8507b634759a472cd56c (diff) | |
download | gitpython-e3e2c8c14b861b4d4865a9574e812ef9f2609771.tar.gz |
Corrected a bunch of whitespace that makes some folks crazy. Added Sebastian to the AUTHORS file.
Diffstat (limited to 'lib/git/stats.py')
-rw-r--r-- | lib/git/stats.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/git/stats.py b/lib/git/stats.py index 307e2f2f..74f0aed9 100644 --- a/lib/git/stats.py +++ b/lib/git/stats.py @@ -1,35 +1,35 @@ # stats.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors +# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php class Stats(object): """ - Represents stat information as presented by git at the end of a merge. It is + Represents stat information as presented by git at the end of a merge. It is created from the output of a diff operation. - + ``Example``:: - + c = Commit( sha1 ) s = c.stats s.total # full-stat-dict s.files # dict( filepath : stat-dict ) - + ``stat-dict`` - + A dictionary with the following keys and values:: - + deletions = number of deleted lines as int insertions = number of inserted lines as int lines = total number of lines changed as int, or deletions + insertions - + ``full-stat-dict`` - + In addition to the items in the stat-dict, it features additional information:: - + files = number of changed files as int - + """ def __init__(self, repo, total, files): self.repo = repo @@ -38,12 +38,12 @@ class Stats(object): @classmethod def list_from_string(cls, repo, text): - """ - Create a Stat object from output retrieved by git-diff. - - Returns - git.Stat - """ + """ + Create a Stat object from output retrieved by git-diff. + + Returns + git.Stat + """ hsh = {'total': {'insertions': 0, 'deletions': 0, 'lines': 0, 'files': 0}, 'files': {}} for line in text.splitlines(): (raw_insertions, raw_deletions, filename) = line.split("\t") |