From be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 16 Nov 2014 20:51:04 +0100 Subject: pep8 linting (blank lines expectations) E301 expected 1 blank line, found 0 E302 expected 2 blank lines, found 1 E303 too many blank lines (n) --- git/objects/commit.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'git/objects/commit.py') diff --git a/git/objects/commit.py b/git/objects/commit.py index db1493d5..b2ed02c0 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -35,7 +35,9 @@ import sys __all__ = ('Commit', ) + class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): + """Wraps a git Commit object. This class will act lazily on some of its attributes and will query the @@ -52,7 +54,6 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): # INVARIANTS default_encoding = "UTF-8" - # object configuration type = "commit" __slots__ = ("tree", @@ -158,7 +159,6 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): else: return len(self.repo.git.rev_list(self.hexsha, **kwargs).splitlines()) - @property def name_rev(self): """ @@ -257,7 +257,6 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): if hasattr(proc_or_stream, 'wait'): finalize_process(proc_or_stream) - @classmethod def create_from_tree(cls, repo, tree, message, parent_commits=None, head=False): """Commit the given tree, creating a commit object. @@ -329,7 +328,6 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): enc_section, enc_option = cls.conf_encoding.split('.') conf_encoding = cr.get_value(enc_section, enc_option, cls.default_encoding) - # if the tree is no object, make sure we create one - otherwise # the created commit object is invalid if isinstance(tree, str): -- cgit v1.2.1