diff options
author | Antoine Musso <hashar@free.fr> | 2014-11-16 20:56:53 +0100 |
---|---|---|
committer | Antoine Musso <hashar@free.fr> | 2014-11-16 21:05:53 +0100 |
commit | 614907b7445e2ed8584c1c37df7e466e3b56170f (patch) | |
tree | 4b6e09110cd356799e9fa0f188fae55e5fa81fca /git/objects/commit.py | |
parent | be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6 (diff) | |
download | gitpython-614907b7445e2ed8584c1c37df7e466e3b56170f.tar.gz |
pep8 linting (whitespace before/after)
E201 whitespace after '('
E202 whitespace before ')'
E203 whitespace before ':'
E225 missing whitespace around operator
E226 missing whitespace around arithmetic operator
E227 missing whitespace around bitwise or shift operator
E228 missing whitespace around modulo operator
E231 missing whitespace after ','
E241 multiple spaces after ','
E251 unexpected spaces around keyword / parameter equals
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r-- | git/objects/commit.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py index b2ed02c0..14cf5bbb 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -64,7 +64,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): def __init__(self, repo, binsha, tree=None, author=None, authored_date=None, author_tz_offset=None, committer=None, committed_date=None, committer_tz_offset=None, - message=None, parents=None, encoding=None, gpgsig=None): + message=None, parents=None, encoding=None, gpgsig=None): """Instantiate a new Commit. All keyword arguments taking None as default will be implicitly set on first query. :param binsha: 20 byte sha1 @@ -98,7 +98,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): :note: Timezone information is in the same format and in the same sign as what time.altzone returns. The sign is inverted compared to git's UTC timezone.""" - super(Commit,self).__init__(repo, binsha) + super(Commit, self).__init__(repo, binsha) if tree is not None: assert isinstance(tree, Tree), "Tree needs to be a Tree instance, was %s" % type(tree) if tree is not None: @@ -235,7 +235,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): :param proc: git-rev-list process instance - one sha per line :return: iterator returning Commit objects""" stream = proc_or_stream - if not hasattr(stream,'readline'): + if not hasattr(stream, 'readline'): stream = proc_or_stream.stdout readline = stream.readline @@ -286,7 +286,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): parents = parent_commits if parent_commits is None: try: - parent_commits = [ repo.head.commit ] + parent_commits = [repo.head.commit] except ValueError: # empty repositories have no head commit parent_commits = list() @@ -400,7 +400,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): if self.gpgsig: write("gpgsig") for sigline in self.gpgsig.rstrip("\n").split("\n"): - write(" "+sigline+"\n") + write(" " + sigline + "\n") write("\n") @@ -416,7 +416,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): """:param from_rev_list: if true, the stream format is coming from the rev-list command Otherwise it is assumed to be a plain data stream from our object""" readline = stream.readline - self.tree = Tree(self.repo, hex_to_bin(readline().split()[1]), Tree.tree_id<<12, '') + self.tree = Tree(self.repo, hex_to_bin(readline().split()[1]), Tree.tree_id << 12, '') self.parents = list() next_line = None @@ -449,9 +449,9 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): buf = enc.strip() while buf != "": if buf[0:10] == "encoding ": - self.encoding = buf[buf.find(' ')+1:] + self.encoding = buf[buf.find(' ') + 1:] elif buf[0:7] == "gpgsig ": - sig = buf[buf.find(' ')+1:] + "\n" + sig = buf[buf.find(' ') + 1:] + "\n" is_next_header = False while True: sigbuf = readline() |