summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2020-05-28 21:40:27 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2020-05-28 21:40:27 +0800
commit69ca329f6015301e289fcbb3c021e430c1bdfa81 (patch)
tree62123d4c88991371b1ead572b35c668215bc8833
parent9c6209f12e78218632319620da066c99d6f771d8 (diff)
downloadgitpython-69ca329f6015301e289fcbb3c021e430c1bdfa81.tar.gz
Fix flake8 errors
-rw-r--r--git/index/base.py4
-rw-r--r--git/refs/symbolic.py2
-rw-r--r--git/remote.py2
-rw-r--r--git/test/test_index.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/git/index/base.py b/git/index/base.py
index 2569e3d7..46974239 100644
--- a/git/index/base.py
+++ b/git/index/base.py
@@ -463,8 +463,8 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
for stage, blob in self.iter_blobs(is_unmerged_blob):
path_map.setdefault(blob.path, []).append((stage, blob))
# END for each unmerged blob
- for l in path_map.values():
- l.sort()
+ for line in path_map.values():
+ line.sort()
return path_map
@classmethod
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py
index aa449528..ee006cbc 100644
--- a/git/refs/symbolic.py
+++ b/git/refs/symbolic.py
@@ -466,7 +466,7 @@ class SymbolicReference(object):
# write-binary is required, otherwise windows will
# open the file in text mode and change LF to CRLF !
with open(pack_file_path, 'wb') as fd:
- fd.writelines(l.encode(defenc) for l in new_lines)
+ fd.writelines(line.encode(defenc) for line in new_lines)
except (OSError, IOError):
pass # it didn't exist at all
diff --git a/git/remote.py b/git/remote.py
index 17fe6c2f..8b00ba0a 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -686,7 +686,7 @@ class Remote(LazyMixin, Iterable):
# read head information
with open(osp.join(self.repo.common_dir, 'FETCH_HEAD'), 'rb') as fp:
- fetch_head_info = [l.decode(defenc) for l in fp.readlines()]
+ fetch_head_info = [line.decode(defenc) for line in fp.readlines()]
l_fil = len(fetch_info_lines)
l_fhi = len(fetch_head_info)
diff --git a/git/test/test_index.py b/git/test/test_index.py
index 3575348a..ce14537a 100644
--- a/git/test/test_index.py
+++ b/git/test/test_index.py
@@ -212,7 +212,7 @@ class TestIndex(TestBase):
assert unmerged_blob_map
# pick the first blob at the first stage we find and use it as resolved version
- three_way_index.resolve_blobs(l[0][1] for l in unmerged_blob_map.values())
+ three_way_index.resolve_blobs(line[0][1] for line in unmerged_blob_map.values())
tree = three_way_index.write_tree()
assert isinstance(tree, Tree)
num_blobs = 0