From ac4f7d34f8752ab78949efcaa9f0bd938df33622 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 18 Mar 2018 21:33:18 +0200 Subject: Rewrite unnecessary dict/list/tuple calls as literals --- git/refs/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/refs/log.py') diff --git a/git/refs/log.py b/git/refs/log.py index 1c085ef1..ac2fe6ea 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""" -- cgit v1.2.1 From 16223e5828ccc8812bd0464d41710c28379c57a9 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 18 Mar 2018 21:57:00 +0200 Subject: Use automatic formatters --- git/refs/log.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'git/refs/log.py') diff --git a/git/refs/log.py b/git/refs/log.py index ac2fe6ea..fc962680 100644 --- a/git/refs/log.py +++ b/git/refs/log.py @@ -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): -- cgit v1.2.1