summaryrefslogtreecommitdiff
path: root/git/objects/commit.py
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2018-03-18 21:33:18 +0200
committerHugo <hugovk@users.noreply.github.com>2018-03-18 22:26:31 +0200
commitac4f7d34f8752ab78949efcaa9f0bd938df33622 (patch)
tree0c7acd1d3c1e0012d26d610c7a9fe81197e28a5e /git/objects/commit.py
parent14582df679a011e8c741eb5dcd8126f883e1bc71 (diff)
downloadgitpython-ac4f7d34f8752ab78949efcaa9f0bd938df33622.tar.gz
Rewrite unnecessary dict/list/tuple calls as literals
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r--git/objects/commit.py4
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()