diff options
-rw-r--r-- | git/cmd.py | 7 | ||||
-rw-r--r-- | git/config.py | 4 | ||||
-rw-r--r-- | git/objects/commit.py | 8 | ||||
-rw-r--r-- | git/objects/fun.py | 1 | ||||
-rw-r--r-- | git/refs/log.py | 2 | ||||
-rw-r--r-- | git/refs/symbolic.py | 2 | ||||
-rw-r--r-- | git/test/performance/test_commit.py | 1 | ||||
-rw-r--r-- | git/test/test_commit.py | 1 | ||||
-rw-r--r-- | git/test/test_config.py | 1 | ||||
-rw-r--r-- | git/test/test_stats.py | 1 | ||||
-rw-r--r-- | git/test/test_tree.py | 2 |
11 files changed, 15 insertions, 15 deletions
@@ -20,7 +20,6 @@ from .util import ( ) from .exc import GitCommandError from git.compat import ( - text_type, string_types, defenc, PY3 @@ -400,7 +399,8 @@ class Git(LazyMixin): if self.GIT_PYTHON_TRACE == 'full': cmdstr = " ".join(command) if stderr_value: - log.info("%s -> %d; stdout: '%s'; stderr: '%s'", cmdstr, status, stdout_value.decode(defenc), stderr_value.decode(defenc)) + log.info("%s -> %d; stdout: '%s'; stderr: '%s'", + cmdstr, status, stdout_value.decode(defenc), stderr_value.decode(defenc)) elif stdout_value: log.info("%s -> %d; stdout: '%s'", cmdstr, status, stdout_value.decode(defenc)) else: @@ -413,8 +413,7 @@ class Git(LazyMixin): else: raise GitCommandError(command, status, stderr_value) - - if isinstance(stdout_value, bytes): # could also be output_stream + if isinstance(stdout_value, bytes): # could also be output_stream stdout_value = stdout_value.decode(defenc) # Allow access to the command's status code diff --git a/git/config.py b/git/config.py index c7e8b7ac..eefab299 100644 --- a/git/config.py +++ b/git/config.py @@ -178,7 +178,7 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, obje # Used in python 3, needs to stay in sync with sections for underlying implementation to work if not hasattr(self, '_proxies'): self._proxies = self._dict() - + self._file_or_files = file_or_files self._read_only = read_only self._is_initialized = False @@ -206,7 +206,7 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, obje def release(self): """Flush changes and release the configuration write lock. This instance must not be used anymore afterwards. - In Python 3, it's required to explicitly release locks and flush changes, as __del__ is not called + In Python 3, it's required to explicitly release locks and flush changes, as __del__ is not called deterministically anymore.""" # checking for the lock here makes sure we do not raise during write() # in case an invalid parser was created who could not get a lock diff --git a/git/objects/commit.py b/git/objects/commit.py index 53af22cd..8f93d1b9 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -382,14 +382,14 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): c = self.committer fmt = "%s %s <%s> %s %s\n" write((fmt % ("author", aname, a.email, - self.authored_date, - altz_to_utctz_str(self.author_tz_offset))).encode(self.encoding)) + self.authored_date, + altz_to_utctz_str(self.author_tz_offset))).encode(self.encoding)) # encode committer aname = c.name write((fmt % ("committer", aname, c.email, - self.committed_date, - altz_to_utctz_str(self.committer_tz_offset))).encode(self.encoding)) + self.committed_date, + altz_to_utctz_str(self.committer_tz_offset))).encode(self.encoding)) if self.encoding != self.default_encoding: write(("encoding %s\n" % self.encoding).encode('ascii')) diff --git a/git/objects/fun.py b/git/objects/fun.py index ba8dbcf4..c04f80b5 100644 --- a/git/objects/fun.py +++ b/git/objects/fun.py @@ -40,6 +40,7 @@ def tree_to_stream(entries, write): write(b''.join((mode_str, b' ', name, b'\0', binsha))) # END for each item + def tree_entries_from_data(data): """Reads the binary representation of a tree and returns tuples of Tree items :param data: data block with tree data (as bytes) diff --git a/git/refs/log.py b/git/refs/log.py index c3019d39..69189b51 100644 --- a/git/refs/log.py +++ b/git/refs/log.py @@ -256,7 +256,7 @@ class RefLog(list, Serializable): committer = isinstance(config_reader, Actor) and config_reader or Actor.committer(config_reader) entry = RefLogEntry(( bin_to_hex(oldbinsha).decode('ascii'), - bin_to_hex(newbinsha).decode('ascii'), + bin_to_hex(newbinsha).decode('ascii'), committer, (int(time.time()), time.altzone), message )) diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index 45a12385..cbb129d4 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -144,7 +144,7 @@ class SymbolicReference(object): for sha, path in cls._iter_packed_refs(repo): if path != ref_path: continue - # sha will be used as + # sha will be used tokens = sha, path break # END for each packed ref diff --git a/git/test/performance/test_commit.py b/git/test/performance/test_commit.py index 9e8c1325..7d3e87c4 100644 --- a/git/test/performance/test_commit.py +++ b/git/test/performance/test_commit.py @@ -15,7 +15,6 @@ from git.compat import xrange from git.test.test_commit import assert_commit_serialization - class TestPerformance(TestBigRepoRW): # ref with about 100 commits in its history diff --git a/git/test/test_commit.py b/git/test/test_commit.py index 37a54092..1f0f8c56 100644 --- a/git/test/test_commit.py +++ b/git/test/test_commit.py @@ -19,7 +19,6 @@ from git import ( Actor, ) from gitdb import IStream -from gitdb.util import hex_to_bin from git.compat import ( string_types, text_type diff --git a/git/test/test_config.py b/git/test/test_config.py index f02754d5..546a2fe1 100644 --- a/git/test/test_config.py +++ b/git/test/test_config.py @@ -18,6 +18,7 @@ import io from copy import copy from git.config import cp + class TestBase(TestCase): def _to_memcache(self, file_path): diff --git a/git/test/test_stats.py b/git/test/test_stats.py index eb8b9dda..884ab1ab 100644 --- a/git/test/test_stats.py +++ b/git/test/test_stats.py @@ -12,6 +12,7 @@ from git.test.lib import ( from git import Stats from git.compat import defenc + class TestStats(TestBase): def test_list_from_string(self): diff --git a/git/test/test_tree.py b/git/test/test_tree.py index 246584ee..7a16b777 100644 --- a/git/test/test_tree.py +++ b/git/test/test_tree.py @@ -138,7 +138,7 @@ class TestTree(TestBase): # END check for slash # slashes in paths are supported as well - # NOTE: on py3, / doesn't work with strings anymore ... + # NOTE: on py3, / doesn't work with strings anymore ... assert root[item.path] == item == root / item.path # END for each item assert found_slash |