From 614907b7445e2ed8584c1c37df7e466e3b56170f Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 16 Nov 2014 20:56:53 +0100 Subject: pep8 linting (whitespace before/after) E201 whitespace after '(' E202 whitespace before ')' E203 whitespace before ':' E225 missing whitespace around operator E226 missing whitespace around arithmetic operator E227 missing whitespace around bitwise or shift operator E228 missing whitespace around modulo operator E231 missing whitespace after ',' E241 multiple spaces after ',' E251 unexpected spaces around keyword / parameter equals --- git/test/test_tree.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'git/test/test_tree.py') diff --git a/git/test/test_tree.py b/git/test/test_tree.py index 7edae577..e3743c2d 100644 --- a/git/test/test_tree.py +++ b/git/test/test_tree.py @@ -59,7 +59,7 @@ class TestTree(TestBase): assert len(testtree) == cur_count # fails with a different sha - name exists - hexsha = "1"*40 + hexsha = "1" * 40 self.failUnlessRaises(ValueError, mod.add, hexsha, tree.mode, name) # force it - replace existing one @@ -113,18 +113,18 @@ class TestTree(TestBase): assert len(list(root)) == len(list(root.traverse(depth=1))) # 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) )) + 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))) # test prune - lib_folder = lambda t,d: t.path == "lib" - pruned_trees = list(root.traverse(predicate = trees_only,prune = lib_folder)) + lib_folder = lambda t, d: t.path == "lib" + pruned_trees = list(root.traverse(predicate=trees_only, prune=lib_folder)) assert len(pruned_trees) < len(trees) # trees and blobs - assert len(set(trees)|set(root.trees)) == len(trees) - assert len(set(b for b in root if isinstance(b, Blob)) | set(root.blobs)) == len( root.blobs ) + assert len(set(trees) | set(root.trees)) == len(trees) + assert len(set(b for b in root if isinstance(b, Blob)) | set(root.blobs)) == len(root.blobs) subitem = trees[0][0] assert "/" in subitem.path assert subitem.name == os.path.basename(subitem.path) @@ -138,6 +138,6 @@ class TestTree(TestBase): # END check for slash # slashes in paths are supported as well - assert root[item.path] == item == root/item.path + assert root[item.path] == item == root / item.path # END for each item assert found_slash -- cgit v1.2.1