summaryrefslogtreecommitdiff
path: root/git/objects/fun.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2018-03-24 13:45:17 +0100
committerGitHub <noreply@github.com>2018-03-24 13:45:17 +0100
commitf3265bd8beb017890699d093586126ff8af4a3fe (patch)
treeccf02df66dbb979c7f6da6949456902a06aa1b1e /git/objects/fun.py
parent9f12b26b81a8e7667b2a26a7878e5bc033610ed5 (diff)
parent80b038f8d8c7c67c148ebd7a5f7a0cb39541b761 (diff)
downloadgitpython-f3265bd8beb017890699d093586126ff8af4a3fe.tar.gz
Merge pull request #737 from hugovk/rm-2.6
Drop support for EOL Python 2.6 and 3.3
Diffstat (limited to 'git/objects/fun.py')
-rw-r--r--git/objects/fun.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/git/objects/fun.py b/git/objects/fun.py
index d5b3f902..38dce0a5 100644
--- a/git/objects/fun.py
+++ b/git/objects/fun.py
@@ -50,7 +50,7 @@ def tree_entries_from_data(data):
space_ord = ord(' ')
len_data = len(data)
i = 0
- out = list()
+ out = []
while i < len_data:
mode = 0
@@ -132,18 +132,18 @@ def traverse_trees_recursive(odb, tree_shas, path_prefix):
:param path_prefix: a prefix to be added to the returned paths on this level,
set it '' for the first iteration
:note: The ordering of the returned items will be partially lost"""
- trees_data = list()
+ trees_data = []
nt = len(tree_shas)
for tree_sha in tree_shas:
if tree_sha is None:
- data = list()
+ data = []
else:
data = tree_entries_from_data(odb.stream(tree_sha).read())
# END handle muted trees
trees_data.append(data)
# END for each sha to get data for
- out = list()
+ out = []
out_append = out.append
# find all matching entries and recursively process them together if the match
@@ -193,7 +193,7 @@ def traverse_tree_recursive(odb, tree_sha, path_prefix):
* [1] mode as int
* [2] path relative to the repository
:param path_prefix: prefix to prepend to the front of all returned paths"""
- entries = list()
+ entries = []
data = tree_entries_from_data(odb.stream(tree_sha).read())
# unpacking/packing is faster than accessing individual items