diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-07 09:06:52 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-07 09:06:52 +0100 |
commit | 3efacd7aea48c93e0a42c1e83bf3c96e9e50f178 (patch) | |
tree | c526ec0e62cddafca1f85cc7d73d79bff10be395 /git | |
parent | d437078d8f95cb98f905162b2b06d04545806c59 (diff) | |
download | gitpython-3efacd7aea48c93e0a42c1e83bf3c96e9e50f178.tar.gz |
This should fix flake8 on py3
See #177
Diffstat (limited to 'git')
-rw-r--r-- | git/cmd.py | 4 | ||||
-rw-r--r-- | git/compat.py | 2 | ||||
-rw-r--r-- | git/test/performance/test_streams.py | 2 | ||||
-rw-r--r-- | git/test/test_repo.py | 2 |
4 files changed, 7 insertions, 3 deletions
@@ -22,7 +22,9 @@ from .exc import GitCommandError from git.compat import ( string_types, defenc, - PY3 + PY3, + # just to satisfy flake8 on py3 + unicode ) execute_kwargs = ('istream', 'with_keep_cwd', 'with_extended_output', diff --git a/git/compat.py b/git/compat.py index 5c330e5b..1ea2119e 100644 --- a/git/compat.py +++ b/git/compat.py @@ -33,6 +33,7 @@ if PY3: return bytes([n]) def mviter(d): return d.values() + unicode = str else: FileType = file # usually, this is just ascii, which might not enough for our encoding needs @@ -41,6 +42,7 @@ else: defenc = 'utf-8' byte_ord = ord bchr = chr + unicode = unicode def mviter(d): return d.itervalues() diff --git a/git/test/performance/test_streams.py b/git/test/performance/test_streams.py index aecb7728..6e23b01d 100644 --- a/git/test/performance/test_streams.py +++ b/git/test/performance/test_streams.py @@ -140,6 +140,6 @@ class TestObjDBPerformance(TestBigRepoR): print(msg, file=sys.stderr) # compare - print ("Git-Python is %f %% faster than git when reading big %s files in chunks" + print("Git-Python is %f %% faster than git when reading big %s files in chunks" % (100.0 - (elapsed_readchunks / gelapsed_readchunks) * 100, desc), file=sys.stderr) # END for each randomization factor diff --git a/git/test/test_repo.py b/git/test/test_repo.py index f216039e..eb831ce3 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -526,7 +526,7 @@ class TestRepo(TestBase): assert obj.type == ref.object.type num_resolved += 1 except BadObject: - print ("failed on %s" % path_section) + print("failed on %s" % path_section) # is fine, in case we have something like 112, which belongs to remotes/rname/merge-requests/112 pass # END exception handling |