diff options
author | Hugo <hugovk@users.noreply.github.com> | 2018-03-18 21:33:18 +0200 |
---|---|---|
committer | Hugo <hugovk@users.noreply.github.com> | 2018-03-18 22:26:31 +0200 |
commit | ac4f7d34f8752ab78949efcaa9f0bd938df33622 (patch) | |
tree | 0c7acd1d3c1e0012d26d610c7a9fe81197e28a5e /git/objects/commit.py | |
parent | 14582df679a011e8c741eb5dcd8126f883e1bc71 (diff) | |
download | gitpython-ac4f7d34f8752ab78949efcaa9f0bd938df33622.tar.gz |
Rewrite unnecessary dict/list/tuple calls as literals
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r-- | git/objects/commit.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py index f29fbaa2..b7d27d92 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -316,7 +316,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): parent_commits = [repo.head.commit] except ValueError: # empty repositories have no head commit - parent_commits = list() + parent_commits = [] # END handle parent commits else: for p in parent_commits: @@ -450,7 +450,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): readline = stream.readline self.tree = Tree(self.repo, hex_to_bin(readline().split()[1]), Tree.tree_id << 12, '') - self.parents = list() + self.parents = [] next_line = None while True: parent_line = readline() |