diff options
author | Hugo <hugovk@users.noreply.github.com> | 2018-03-18 21:43:41 +0200 |
---|---|---|
committer | Hugo <hugovk@users.noreply.github.com> | 2018-03-18 22:26:31 +0200 |
commit | 87a644184b05e99a4809de378f21424ef6ced06e (patch) | |
tree | 8179e2a309fc9765544d6b95e85485fdfc322ef7 /git/test/test_tree.py | |
parent | 34cce402e23a21ba9c3fdf5cd7f27a85e65245c2 (diff) | |
download | gitpython-87a644184b05e99a4809de378f21424ef6ced06e.tar.gz |
Unnecessary generator - rewrite as a list comprehension
Diffstat (limited to 'git/test/test_tree.py')
-rw-r--r-- | git/test/test_tree.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git/test/test_tree.py b/git/test/test_tree.py index 2b2ddb05..3005722f 100644 --- a/git/test/test_tree.py +++ b/git/test/test_tree.py @@ -79,7 +79,7 @@ class TestTree(TestBase): # only choose trees trees_only = lambda i, d: i.type == "tree" trees = list(root.traverse(predicate=trees_only)) - assert len(trees) == len(list(i for i in root.traverse() if trees_only(i, 0))) + assert len(trees) == len([i for i in root.traverse() if trees_only(i, 0)]) # test prune lib_folder = lambda t, d: t.path == "lib" |