From 62f1e679fc2d764b4318ce1f868818ba4045e4c7 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:07:29 +0530 Subject: [PATCH 01/30] updated db.py, removed unused variables --- git/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/db.py b/git/db.py index 653fa7daa..9b3345288 100644 --- a/git/db.py +++ b/git/db.py @@ -51,7 +51,7 @@ def partial_to_complete_sha_hex(self, partial_hexsha): :note: currently we only raise BadObject as git does not communicate AmbiguousObjects separately""" try: - hexsha, typename, size = self._git.get_object_header(partial_hexsha) # @UnusedVariable + hexsha, _typename, _size = self._git.get_object_header(partial_hexsha) return hex_to_bin(hexsha) except (GitCommandError, ValueError): raise BadObject(partial_hexsha) From 0e467c8b1483eb3e3bcc8a590f1d9df2877a5967 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:08:39 +0530 Subject: [PATCH 02/30] updated fun.py, removed unused variables --- git/index/fun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/index/fun.py b/git/index/fun.py index c8912dd23..95fb85818 100644 --- a/git/index/fun.py +++ b/git/index/fun.py @@ -265,7 +265,7 @@ def write_tree_from_cache(entries, odb, sl, si=0): # enter recursion # ci - 1 as we want to count our current item as well - sha, tree_entry_list = write_tree_from_cache(entries, odb, slice(ci - 1, xi), rbound + 1) # @UnusedVariable + sha, _tree_entry_list = write_tree_from_cache(entries, odb, slice(ci - 1, xi), rbound + 1) tree_items_append((sha, S_IFDIR, base)) # skip ahead From ac5e24fea9dc603af7767a53bda39c8439351af7 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:15:04 +0530 Subject: [PATCH 03/30] changed unused variables assingment --- git/objects/fun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/objects/fun.py b/git/objects/fun.py index 38dce0a5d..9058ac164 100644 --- a/git/objects/fun.py +++ b/git/objects/fun.py @@ -156,7 +156,7 @@ def traverse_trees_recursive(odb, tree_shas, path_prefix): # END skip already done items entries = [None for _ in range(nt)] entries[ti] = item - sha, mode, name = item # its faster to unpack @UnusedVariable + _sha, mode, name = item is_dir = S_ISDIR(mode) # type mode bits # find this item in all other tree data items From 4c23668d6db2e9c09cd0bb2aa90d50f41f4e296d Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:16:36 +0530 Subject: [PATCH 04/30] renamed unused variables --- git/objects/tag.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git/objects/tag.py b/git/objects/tag.py index 4295a03af..c68383361 100644 --- a/git/objects/tag.py +++ b/git/objects/tag.py @@ -52,8 +52,8 @@ def _set_cache_(self, attr): ostream = self.repo.odb.stream(self.binsha) lines = ostream.read().decode(defenc).splitlines() - obj, hexsha = lines[0].split(" ") # object @UnusedVariable - type_token, type_name = lines[1].split(" ") # type @UnusedVariable + _obj, hexsha = lines[0].split(" ") + _type_token, type_name = lines[1].split(" ") self.object = \ get_object_type_by_name(type_name.encode('ascii'))(self.repo, hex_to_bin(hexsha)) From 760be67a4ea0dd2972d5a56142d5af78caf5f468 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:18:53 +0530 Subject: [PATCH 05/30] renamed unused variables --- git/refs/symbolic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index a8ca6538f..766037c15 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -614,7 +614,7 @@ def _iter_items(cls, repo, common_path=None): # END for each directory to walk # read packed refs - for sha, rela_path in cls._iter_packed_refs(repo): # @UnusedVariable + for _sha, rela_path in cls._iter_packed_refs(repo): if rela_path.startswith(common_path): rela_paths.add(rela_path) # END relative path matches common path From 3b4a7323b8cf43a64f67d0d12212f778bd80891a Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:20:21 +0530 Subject: [PATCH 06/30] renamed ununsed variables --- git/test/performance/test_streams.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/test/performance/test_streams.py b/git/test/performance/test_streams.py index 2e3772a02..a08d5edc9 100644 --- a/git/test/performance/test_streams.py +++ b/git/test/performance/test_streams.py @@ -121,7 +121,7 @@ def test_large_data_streaming(self, rwrepo): # read all st = time() - hexsha, typename, size, data = rwrepo.git.get_object_data(gitsha) # @UnusedVariable + _hexsha, _typename, size, data = rwrepo.git.get_object_data(gitsha) # @UnusedVariable gelapsed_readall = time() - st print("Read %i KiB of %s data at once using git-cat-file in %f s ( %f Read KiB / s)" % (size_kib, desc, gelapsed_readall, size_kib / gelapsed_readall), file=sys.stderr) From 8560461e11e3e485349bb883e8c63a64da1b26aa Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:21:33 +0530 Subject: [PATCH 07/30] renamed ununsed variables --- git/test/test_commit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/test/test_commit.py b/git/test/test_commit.py index cd6c5d5f6..00b6d8dcd 100644 --- a/git/test/test_commit.py +++ b/git/test/test_commit.py @@ -125,7 +125,7 @@ def check_entries(d): check_entries(stats.total) assert "files" in stats.total - for filepath, d in stats.files.items(): # @UnusedVariable + for _filepath, d in stats.files.items(): check_entries(d) # END for each stated file From 8465f1ec18b3652c09fdd12cd43075a08df4b6a0 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:22:30 +0530 Subject: [PATCH 08/30] renamed unused variables --- git/objects/commit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/objects/commit.py b/git/objects/commit.py index 916a10816..b3b02f9f4 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -140,7 +140,7 @@ def _get_intermediate_items(cls, commit): def _set_cache_(self, attr): if attr in Commit.__slots__: # read the data in a chunk, its faster - then provide a file wrapper - binsha, typename, self.size, stream = self.repo.odb.stream(self.binsha) # @UnusedVariable + _binsha, _typename, self.size, stream = self.repo.odb.stream(self.binsha) self._deserialize(BytesIO(stream.read())) else: super(Commit, self)._set_cache_(attr) From c28bdfc5835a432d414bebdc9de2448eacb205ab Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:23:14 +0530 Subject: [PATCH 09/30] renamed unsed variables --- git/test/test_remote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/test/test_remote.py b/git/test/test_remote.py index 77e3ffbfd..a7a499097 100644 --- a/git/test/test_remote.py +++ b/git/test/test_remote.py @@ -93,7 +93,7 @@ def make_assertion(self): assert self._stages_per_op # must have seen all stages - for op, stages in self._stages_per_op.items(): # @UnusedVariable + for _op, stages in self._stages_per_op.items(): assert stages & self.STAGE_MASK == self.STAGE_MASK # END for each op/stage From 4d25dfd2780a0f650e4bdc62584280a81a31f121 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:23:49 +0530 Subject: [PATCH 10/30] renamed unused variables --- git/remote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/remote.py b/git/remote.py index 73f102868..b4b6deea7 100644 --- a/git/remote.py +++ b/git/remote.py @@ -183,7 +183,7 @@ def _from_line(cls, remote, line): split_token = "..." if control_character == " ": split_token = ".." - old_sha, new_sha = summary.split(' ')[0].split(split_token) # @UnusedVariable + old_sha, _new_sha = summary.split(' ')[0].split(split_token) # have to use constructor here as the sha usually is abbreviated old_commit = old_sha # END message handling From 1f8a5bc108691e1791a8d6746a4c1b3b3f8763a0 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:24:49 +0530 Subject: [PATCH 11/30] renamed unused vars --- git/remote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/remote.py b/git/remote.py index b4b6deea7..b6a5bcc6b 100644 --- a/git/remote.py +++ b/git/remote.py @@ -295,7 +295,7 @@ def _from_line(cls, repo, line, fetch_line): # parse lines control_character, operation, local_remote_ref, remote_local_ref, note = match.groups() try: - new_hex_sha, fetch_operation, fetch_note = fetch_line.split("\t") # @UnusedVariable + _new_hex_sha, _fetch_operation, fetch_note = fetch_line.split("\t") ref_type_name, fetch_note = fetch_note.split(' ', 1) except ValueError: # unpack error raise ValueError("Failed to parse FETCH_HEAD line: %r" % fetch_line) From 3f2e9189d91480108caee8707c127e22b2d8a607 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:25:58 +0530 Subject: [PATCH 12/30] renamed unused variables --- git/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/util.py b/git/util.py index 7c07b0f3d..81c3bbd06 100644 --- a/git/util.py +++ b/git/util.py @@ -416,7 +416,7 @@ def _parse_progress_line(self, line): # END could not get match op_code = 0 - remote, op_name, percent, cur_count, max_count, message = match.groups() # @UnusedVariable + _remote, op_name, _percent, cur_count, max_count, message = match.groups() # get operation id if op_name == "Counting objects": From bb461666e3abf4f0383772a355670bef72b45135 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:26:49 +0530 Subject: [PATCH 13/30] renamed unused variables --- git/test/test_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/test/test_docs.py b/git/test/test_docs.py index c14f5ff3b..f52a0fb2d 100644 --- a/git/test/test_docs.py +++ b/git/test/test_docs.py @@ -349,7 +349,7 @@ def test_references_and_objects(self, rw_dir): # The index contains all blobs in a flat list assert len(list(index.iter_blobs())) == len([o for o in repo.head.commit.tree.traverse() if o.type == 'blob']) # Access blob objects - for (path, stage), entry in index.entries.items(): # @UnusedVariable + for (path, _stage), entry in index.entries.items(): pass new_file_path = os.path.join(repo.working_tree_dir, 'new-file-name') open(new_file_path, 'w').close() From 01a76c88f81b3193f5b212842116b0c4dc88a415 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:28:08 +0530 Subject: [PATCH 14/30] renamed unused variables --- git/index/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git/index/base.py b/git/index/base.py index 04a3934d6..b095acadd 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -158,7 +158,7 @@ def _delete_entries_cache(self): def _deserialize(self, stream): """Initialize this instance with index values read from the given stream""" - self.version, self.entries, self._extension_data, conten_sha = read_cache(stream) # @UnusedVariable + self.version, self.entries, self._extension_data, _conten_sha = read_cache(stream) return self def _entries_sorted(self): @@ -392,7 +392,7 @@ def raise_exc(e): continue # END glob handling try: - for root, dirs, files in os.walk(abs_path, onerror=raise_exc): # @UnusedVariable + for root, _dirs, files in os.walk(abs_path, onerror=raise_exc): for rela_file in files: # add relative paths only yield osp.join(root.replace(rs, ''), rela_file) From f05ab3440f72b704474ab912814f693f9bdaf840 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:28:54 +0530 Subject: [PATCH 15/30] renamed unused variables --- git/test/test_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git/test/test_index.py b/git/test/test_index.py index 110092396..8d2d2e398 100644 --- a/git/test/test_index.py +++ b/git/test/test_index.py @@ -75,7 +75,7 @@ def __init__(self, *args): def _assert_fprogress(self, entries): self.assertEqual(len(entries), len(self._fprogress_map)) - for path, call_count in self._fprogress_map.items(): # @UnusedVariable + for _path, call_count in self._fprogress_map.items(): self.assertEqual(call_count, 2) # END for each item in progress map self._reset_progress() @@ -201,7 +201,7 @@ def test_index_file_from_tree(self, rw_repo): # test BlobFilter prefix = 'lib/git' - for stage, blob in base_index.iter_blobs(BlobFilter([prefix])): # @UnusedVariable + for _stage, blob in base_index.iter_blobs(BlobFilter([prefix])): assert blob.path.startswith(prefix) # writing a tree should fail with an unmerged index From 506709b1fa5a66255c9b3daa3422336c0768fd56 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:38:02 +0530 Subject: [PATCH 16/30] renamed unused variables --- git/test/performance/test_streams.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/test/performance/test_streams.py b/git/test/performance/test_streams.py index a08d5edc9..ab3313c9d 100644 --- a/git/test/performance/test_streams.py +++ b/git/test/performance/test_streams.py @@ -132,7 +132,7 @@ def test_large_data_streaming(self, rwrepo): # read chunks st = time() - hexsha, typename, size, stream = rwrepo.git.stream_object_data(gitsha) # @UnusedVariable + _hexsha, _typename, size, stream = rwrepo.git.stream_object_data(gitsha) while True: data = stream.read(cs) if len(data) < cs: From e1270c9211c41992046c02de144f25da1717d3eb Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:40:23 +0530 Subject: [PATCH 17/30] removed trailing whitespaces --- git/index/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/index/base.py b/git/index/base.py index b095acadd..8aa749a26 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -158,7 +158,7 @@ def _delete_entries_cache(self): def _deserialize(self, stream): """Initialize this instance with index values read from the given stream""" - self.version, self.entries, self._extension_data, _conten_sha = read_cache(stream) + self.version, self.entries, self._extension_data, _conten_sha = read_cache(stream) return self def _entries_sorted(self): From b90a3eb2e84d38928bd8ed577a5bd9da123080a9 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:41:12 +0530 Subject: [PATCH 18/30] removed trailing whitespaces --- git/index/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/index/base.py b/git/index/base.py index 8aa749a26..0bcd15a3e 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -392,7 +392,7 @@ def raise_exc(e): continue # END glob handling try: - for root, _dirs, files in os.walk(abs_path, onerror=raise_exc): + for root, _dirs, files in os.walk(abs_path, onerror=raise_exc): for rela_file in files: # add relative paths only yield osp.join(root.replace(rs, ''), rela_file) From 432d87b703807346e1ba6dc2f29788fa5ab28591 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:41:46 +0530 Subject: [PATCH 19/30] removed trailing whitespaces --- git/index/fun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/index/fun.py b/git/index/fun.py index 95fb85818..f0091a3a1 100644 --- a/git/index/fun.py +++ b/git/index/fun.py @@ -265,7 +265,7 @@ def write_tree_from_cache(entries, odb, sl, si=0): # enter recursion # ci - 1 as we want to count our current item as well - sha, _tree_entry_list = write_tree_from_cache(entries, odb, slice(ci - 1, xi), rbound + 1) + sha, _tree_entry_list = write_tree_from_cache(entries, odb, slice(ci - 1, xi), rbound + 1) tree_items_append((sha, S_IFDIR, base)) # skip ahead From 9aa0ce0cc70890a78cf2d2618f268dd7993f2e51 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:42:11 +0530 Subject: [PATCH 20/30] removed trailing whitespaces --- git/objects/commit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/objects/commit.py b/git/objects/commit.py index b3b02f9f4..997fc5909 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -140,7 +140,7 @@ def _get_intermediate_items(cls, commit): def _set_cache_(self, attr): if attr in Commit.__slots__: # read the data in a chunk, its faster - then provide a file wrapper - _binsha, _typename, self.size, stream = self.repo.odb.stream(self.binsha) + _binsha, _typename, self.size, stream = self.repo.odb.stream(self.binsha) self._deserialize(BytesIO(stream.read())) else: super(Commit, self)._set_cache_(attr) From 9345cc7c2804850203143c64fcb00fce3f645a7f Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:42:43 +0530 Subject: [PATCH 21/30] removed trailing whitespaces --- git/objects/fun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/objects/fun.py b/git/objects/fun.py index 9058ac164..dc879fd2d 100644 --- a/git/objects/fun.py +++ b/git/objects/fun.py @@ -156,7 +156,7 @@ def traverse_trees_recursive(odb, tree_shas, path_prefix): # END skip already done items entries = [None for _ in range(nt)] entries[ti] = item - _sha, mode, name = item + _sha, mode, name = item is_dir = S_ISDIR(mode) # type mode bits # find this item in all other tree data items From e5e1bb5f871f3ec8a61dcf0e895f72d838c72582 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:43:04 +0530 Subject: [PATCH 22/30] removed trailing whitespaces --- git/objects/tag.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git/objects/tag.py b/git/objects/tag.py index c68383361..017c49883 100644 --- a/git/objects/tag.py +++ b/git/objects/tag.py @@ -52,8 +52,8 @@ def _set_cache_(self, attr): ostream = self.repo.odb.stream(self.binsha) lines = ostream.read().decode(defenc).splitlines() - _obj, hexsha = lines[0].split(" ") - _type_token, type_name = lines[1].split(" ") + _obj, hexsha = lines[0].split(" ") + _type_token, type_name = lines[1].split(" ") self.object = \ get_object_type_by_name(type_name.encode('ascii'))(self.repo, hex_to_bin(hexsha)) From 2308d2f809c764060643604ef4715d20a291f32a Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:43:42 +0530 Subject: [PATCH 23/30] removed trailing whitespaces --- git/remote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/remote.py b/git/remote.py index b6a5bcc6b..403257394 100644 --- a/git/remote.py +++ b/git/remote.py @@ -183,7 +183,7 @@ def _from_line(cls, remote, line): split_token = "..." if control_character == " ": split_token = ".." - old_sha, _new_sha = summary.split(' ')[0].split(split_token) + old_sha, _new_sha = summary.split(' ')[0].split(split_token) # have to use constructor here as the sha usually is abbreviated old_commit = old_sha # END message handling From 8640e06c8590db559c4f671c4d853cfa9a441a6e Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:44:10 +0530 Subject: [PATCH 24/30] removed trailing whitespaces --- git/remote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/remote.py b/git/remote.py index 403257394..e7b3579bc 100644 --- a/git/remote.py +++ b/git/remote.py @@ -295,7 +295,7 @@ def _from_line(cls, repo, line, fetch_line): # parse lines control_character, operation, local_remote_ref, remote_local_ref, note = match.groups() try: - _new_hex_sha, _fetch_operation, fetch_note = fetch_line.split("\t") + _new_hex_sha, _fetch_operation, fetch_note = fetch_line.split("\t") ref_type_name, fetch_note = fetch_note.split(' ', 1) except ValueError: # unpack error raise ValueError("Failed to parse FETCH_HEAD line: %r" % fetch_line) From fb9220129203a2ed63e14a7f20f1a57eb25255a3 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:44:32 +0530 Subject: [PATCH 25/30] Update test_streams.py --- git/test/performance/test_streams.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git/test/performance/test_streams.py b/git/test/performance/test_streams.py index ab3313c9d..cc6f0335c 100644 --- a/git/test/performance/test_streams.py +++ b/git/test/performance/test_streams.py @@ -121,7 +121,7 @@ def test_large_data_streaming(self, rwrepo): # read all st = time() - _hexsha, _typename, size, data = rwrepo.git.get_object_data(gitsha) # @UnusedVariable + _hexsha, _typename, size, data = rwrepo.git.get_object_data(gitsha) gelapsed_readall = time() - st print("Read %i KiB of %s data at once using git-cat-file in %f s ( %f Read KiB / s)" % (size_kib, desc, gelapsed_readall, size_kib / gelapsed_readall), file=sys.stderr) @@ -132,7 +132,7 @@ def test_large_data_streaming(self, rwrepo): # read chunks st = time() - _hexsha, _typename, size, stream = rwrepo.git.stream_object_data(gitsha) + _hexsha, _typename, size, stream = rwrepo.git.stream_object_data(gitsha) while True: data = stream.read(cs) if len(data) < cs: From fe05338b983fb3ab1903fbee3bef22c5876bcc9a Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:45:01 +0530 Subject: [PATCH 26/30] removed trailing whitespaces --- git/test/test_commit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/test/test_commit.py b/git/test/test_commit.py index 00b6d8dcd..96a03b20d 100644 --- a/git/test/test_commit.py +++ b/git/test/test_commit.py @@ -125,7 +125,7 @@ def check_entries(d): check_entries(stats.total) assert "files" in stats.total - for _filepath, d in stats.files.items(): + for _filepath, d in stats.files.items(): check_entries(d) # END for each stated file From b597a1422027164161d3fdd3bc260f85f203324c Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:45:19 +0530 Subject: [PATCH 27/30] removed trailing whitespaces --- git/test/test_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/test/test_docs.py b/git/test/test_docs.py index f52a0fb2d..a1fea4540 100644 --- a/git/test/test_docs.py +++ b/git/test/test_docs.py @@ -349,7 +349,7 @@ def test_references_and_objects(self, rw_dir): # The index contains all blobs in a flat list assert len(list(index.iter_blobs())) == len([o for o in repo.head.commit.tree.traverse() if o.type == 'blob']) # Access blob objects - for (path, _stage), entry in index.entries.items(): + for (path, _stage), entry in index.entries.items(): pass new_file_path = os.path.join(repo.working_tree_dir, 'new-file-name') open(new_file_path, 'w').close() From a1d758b2fd1100e9759634a05b4c26c1878d1c51 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:45:52 +0530 Subject: [PATCH 28/30] removed trailing whitespaces --- git/test/test_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git/test/test_index.py b/git/test/test_index.py index 8d2d2e398..577676f96 100644 --- a/git/test/test_index.py +++ b/git/test/test_index.py @@ -75,7 +75,7 @@ def __init__(self, *args): def _assert_fprogress(self, entries): self.assertEqual(len(entries), len(self._fprogress_map)) - for _path, call_count in self._fprogress_map.items(): + for _path, call_count in self._fprogress_map.items(): self.assertEqual(call_count, 2) # END for each item in progress map self._reset_progress() @@ -201,7 +201,7 @@ def test_index_file_from_tree(self, rw_repo): # test BlobFilter prefix = 'lib/git' - for _stage, blob in base_index.iter_blobs(BlobFilter([prefix])): + for _stage, blob in base_index.iter_blobs(BlobFilter([prefix])): assert blob.path.startswith(prefix) # writing a tree should fail with an unmerged index From b711996472ceba95e1ebdc1ae6634a6b09be3763 Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:46:10 +0530 Subject: [PATCH 29/30] removed trailing whitespaces --- git/test/test_remote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/test/test_remote.py b/git/test/test_remote.py index a7a499097..95898f125 100644 --- a/git/test/test_remote.py +++ b/git/test/test_remote.py @@ -93,7 +93,7 @@ def make_assertion(self): assert self._stages_per_op # must have seen all stages - for _op, stages in self._stages_per_op.items(): + for _op, stages in self._stages_per_op.items(): assert stages & self.STAGE_MASK == self.STAGE_MASK # END for each op/stage From eddc11cb79756c1f74d50992befc27aeca0f5f0d Mon Sep 17 00:00:00 2001 From: Pratik Anurag Date: Tue, 15 Oct 2019 17:46:37 +0530 Subject: [PATCH 30/30] removed trailing whitespaces --- git/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/util.py b/git/util.py index 81c3bbd06..c395afd26 100644 --- a/git/util.py +++ b/git/util.py @@ -416,7 +416,7 @@ def _parse_progress_line(self, line): # END could not get match op_code = 0 - _remote, op_name, _percent, cur_count, max_count, message = match.groups() + _remote, op_name, _percent, cur_count, max_count, message = match.groups() # get operation id if op_name == "Counting objects":