diff options
| author | Sebastian Thiel <byronimo@gmail.com> | 2018-03-24 13:45:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-24 13:45:17 +0100 |
| commit | f3265bd8beb017890699d093586126ff8af4a3fe (patch) | |
| tree | ccf02df66dbb979c7f6da6949456902a06aa1b1e /git/refs | |
| parent | 9f12b26b81a8e7667b2a26a7878e5bc033610ed5 (diff) | |
| parent | 80b038f8d8c7c67c148ebd7a5f7a0cb39541b761 (diff) | |
| download | GitPython-f3265bd8beb017890699d093586126ff8af4a3fe.tar.gz GitPython-f3265bd8beb017890699d093586126ff8af4a3fe.zip | |
Merge pull request #737 from hugovk/rm-2.6
Drop support for EOL Python 2.6 and 3.3
Diffstat (limited to 'git/refs')
| -rw-r--r-- | git/refs/head.py | 2 | ||||
| -rw-r--r-- | git/refs/log.py | 16 | ||||
| -rw-r--r-- | git/refs/reference.py | 2 | ||||
| -rw-r--r-- | git/refs/symbolic.py | 2 | ||||
| -rw-r--r-- | git/refs/tag.py | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/git/refs/head.py b/git/refs/head.py index 9ad890db..4b0abb06 100644 --- a/git/refs/head.py +++ b/git/refs/head.py @@ -20,7 +20,7 @@ class HEAD(SymbolicReference): HEAD reference.""" _HEAD_NAME = 'HEAD' _ORIG_HEAD_NAME = 'ORIG_HEAD' - __slots__ = tuple() + __slots__ = () def __init__(self, repo, path=_HEAD_NAME): if path != self._HEAD_NAME: diff --git a/git/refs/log.py b/git/refs/log.py index 1c085ef1..fc962680 100644 --- a/git/refs/log.py +++ b/git/refs/log.py @@ -32,7 +32,7 @@ class RefLogEntry(tuple): """Named tuple allowing easy access to the revlog data fields""" _re_hexsha_only = re.compile('^[0-9A-Fa-f]{40}$') - __slots__ = tuple() + __slots__ = () def __repr__(self): """Representation of ourselves in git reflog format""" @@ -48,13 +48,13 @@ class RefLogEntry(tuple): """:return: a string suitable to be placed in a reflog file""" act = self.actor time = self.time - return u"{0} {1} {2} <{3}> {4!s} {5}\t{6}\n".format(self.oldhexsha, - self.newhexsha, - act.name, - act.email, - time[0], - altz_to_utctz_str(time[1]), - self.message) + return u"{} {} {} <{}> {!s} {}\t{}\n".format(self.oldhexsha, + self.newhexsha, + act.name, + act.email, + time[0], + altz_to_utctz_str(time[1]), + self.message) @property def oldhexsha(self): diff --git a/git/refs/reference.py b/git/refs/reference.py index 734ed8b9..aaa9b63f 100644 --- a/git/refs/reference.py +++ b/git/refs/reference.py @@ -27,7 +27,7 @@ class Reference(SymbolicReference, LazyMixin, Iterable): """Represents a named reference to any object. Subclasses may apply restrictions though, i.e. Heads can only point to commits.""" - __slots__ = tuple() + __slots__ = () _points_to_commits_only = False _resolve_ref_on_create = True _common_path_default = "refs" diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index 8efeafc5..a8ca6538 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -444,7 +444,7 @@ class SymbolicReference(object): pack_file_path = cls._get_packed_refs_path(repo) try: with open(pack_file_path, 'rb') as reader: - new_lines = list() + new_lines = [] made_change = False dropped_last_line = False for line in reader: diff --git a/git/refs/tag.py b/git/refs/tag.py index 37ee1240..8f88c522 100644 --- a/git/refs/tag.py +++ b/git/refs/tag.py @@ -17,7 +17,7 @@ class TagReference(Reference): if tagref.tag is not None: print(tagref.tag.message)""" - __slots__ = tuple() + __slots__ = () _common_path_default = "refs/tags" @property |
