summaryrefslogtreecommitdiff
path: root/git/test/test_index.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/test/test_index.py
parent14582df679a011e8c741eb5dcd8126f883e1bc71 (diff)
downloadgitpython-ac4f7d34f8752ab78949efcaa9f0bd938df33622.tar.gz
Rewrite unnecessary dict/list/tuple calls as literals
Diffstat (limited to 'git/test/test_index.py')
-rw-r--r--git/test/test_index.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/git/test/test_index.py b/git/test/test_index.py
index ec3c59df..56c7e795 100644
--- a/git/test/test_index.py
+++ b/git/test/test_index.py
@@ -97,7 +97,7 @@ class TestIndex(TestBase):
def _reset_progress(self):
# maps paths to the count of calls
- self._fprogress_map = dict()
+ self._fprogress_map = {}
def _assert_entries(self, entries):
for entry in entries:
@@ -141,7 +141,7 @@ class TestIndex(TestBase):
if isinstance(tree, str):
tree = self.rorepo.commit(tree).tree
- blist = list()
+ blist = []
for blob in tree.traverse(predicate=lambda e, d: e.type == "blob", branch_first=False):
assert (blob.path, 0) in index.entries
blist.append(blob)
@@ -527,7 +527,7 @@ class TestIndex(TestBase):
# same index, no parents
commit_message = "index without parents"
- commit_no_parents = index.commit(commit_message, parent_commits=list(), head=True)
+ commit_no_parents = index.commit(commit_message, parent_commits=[], head=True)
self.assertEqual(commit_no_parents.message, commit_message)
self.assertEqual(len(commit_no_parents.parents), 0)
self.assertEqual(cur_head.commit, commit_no_parents)