Skip to content

Commit e0c65d6

Browse files
committed
Make flake8 happy
1 parent 02e942b commit e0c65d6

File tree

11 files changed

+15
-15
lines changed

11 files changed

+15
-15
lines changed

‎git/cmd.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
)
2121
from .exc import GitCommandError
2222
from git.compat import (
23-
text_type,
2423
string_types,
2524
defenc,
2625
PY3
@@ -400,7 +399,8 @@ def execute(self, command,
400399
if self.GIT_PYTHON_TRACE == 'full':
401400
cmdstr = " ".join(command)
402401
if stderr_value:
403-
log.info("%s -> %d; stdout: '%s'; stderr: '%s'", cmdstr, status, stdout_value.decode(defenc), stderr_value.decode(defenc))
402+
log.info("%s -> %d; stdout: '%s'; stderr: '%s'",
403+
cmdstr, status, stdout_value.decode(defenc), stderr_value.decode(defenc))
404404
elif stdout_value:
405405
log.info("%s -> %d; stdout: '%s'", cmdstr, status, stdout_value.decode(defenc))
406406
else:
@@ -413,8 +413,7 @@ def execute(self, command,
413413
else:
414414
raise GitCommandError(command, status, stderr_value)
415415

416-
417-
if isinstance(stdout_value, bytes): # could also be output_stream
416+
if isinstance(stdout_value, bytes): # could also be output_stream
418417
stdout_value = stdout_value.decode(defenc)
419418

420419
# Allow access to the command's status code

‎git/config.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def __init__(self, file_or_files, read_only=True):
178178
# Used in python 3, needs to stay in sync with sections for underlying implementation to work
179179
if not hasattr(self, '_proxies'):
180180
self._proxies = self._dict()
181-
181+
182182
self._file_or_files = file_or_files
183183
self._read_only = read_only
184184
self._is_initialized = False
@@ -206,7 +206,7 @@ def __del__(self):
206206

207207
def release(self):
208208
"""Flush changes and release the configuration write lock. This instance must not be used anymore afterwards.
209-
In Python 3, it's required to explicitly release locks and flush changes, as __del__ is not called
209+
In Python 3, it's required to explicitly release locks and flush changes, as __del__ is not called
210210
deterministically anymore."""
211211
# checking for the lock here makes sure we do not raise during write()
212212
# in case an invalid parser was created who could not get a lock

‎git/objects/commit.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,14 @@ def _serialize(self, stream):
382382
c = self.committer
383383
fmt = "%s %s <%s> %s %s\n"
384384
write((fmt % ("author", aname, a.email,
385-
self.authored_date,
386-
altz_to_utctz_str(self.author_tz_offset))).encode(self.encoding))
385+
self.authored_date,
386+
altz_to_utctz_str(self.author_tz_offset))).encode(self.encoding))
387387

388388
# encode committer
389389
aname = c.name
390390
write((fmt % ("committer", aname, c.email,
391-
self.committed_date,
392-
altz_to_utctz_str(self.committer_tz_offset))).encode(self.encoding))
391+
self.committed_date,
392+
altz_to_utctz_str(self.committer_tz_offset))).encode(self.encoding))
393393

394394
if self.encoding != self.default_encoding:
395395
write(("encoding %s\n" % self.encoding).encode('ascii'))

‎git/objects/fun.py

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def tree_to_stream(entries, write):
4040
write(b''.join((mode_str, b' ', name, b'\0', binsha)))
4141
# END for each item
4242

43+
4344
def tree_entries_from_data(data):
4445
"""Reads the binary representation of a tree and returns tuples of Tree items
4546
:param data: data block with tree data (as bytes)

‎git/refs/log.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def append_entry(cls, config_reader, filepath, oldbinsha, newbinsha, message):
256256
committer = isinstance(config_reader, Actor) and config_reader or Actor.committer(config_reader)
257257
entry = RefLogEntry((
258258
bin_to_hex(oldbinsha).decode('ascii'),
259-
bin_to_hex(newbinsha).decode('ascii'),
259+
bin_to_hex(newbinsha).decode('ascii'),
260260
committer, (int(time.time()), time.altzone), message
261261
))
262262

‎git/refs/symbolic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _get_ref_info(cls, repo, ref_path):
144144
for sha, path in cls._iter_packed_refs(repo):
145145
if path != ref_path:
146146
continue
147-
# sha will be used as
147+
# sha will be used
148148
tokens = sha, path
149149
break
150150
# END for each packed ref

‎git/test/performance/test_commit.py

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from git.test.test_commit import assert_commit_serialization
1616

1717

18-
1918
class TestPerformance(TestBigRepoRW):
2019

2120
# ref with about 100 commits in its history

‎git/test/test_commit.py

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
Actor,
2020
)
2121
from gitdb import IStream
22-
from gitdb.util import hex_to_bin
2322
from git.compat import (
2423
string_types,
2524
text_type

‎git/test/test_config.py

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from copy import copy
1919
from git.config import cp
2020

21+
2122
class TestBase(TestCase):
2223

2324
def _to_memcache(self, file_path):

‎git/test/test_stats.py

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from git import Stats
1313
from git.compat import defenc
1414

15+
1516
class TestStats(TestBase):
1617

1718
def test_list_from_string(self):

‎git/test/test_tree.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def test_traverse(self):
138138
# END check for slash
139139

140140
# slashes in paths are supported as well
141-
# NOTE: on py3, / doesn't work with strings anymore ...
141+
# NOTE: on py3, / doesn't work with strings anymore ...
142142
assert root[item.path] == item == root / item.path
143143
# END for each item
144144
assert found_slash

0 commit comments

Comments
 (0)