summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2018-03-18 21:57:00 +0200
committerHugo <hugovk@users.noreply.github.com>2018-03-18 22:26:31 +0200
commit16223e5828ccc8812bd0464d41710c28379c57a9 (patch)
treeb40965e98962b24b8bb5778451d7b0896910582b
parent9ec27096fbe036a97ead869c7522262f63165e1e (diff)
downloadgitpython-16223e5828ccc8812bd0464d41710c28379c57a9.tar.gz
Use automatic formatters
-rw-r--r--git/refs/log.py14
-rw-r--r--git/test/test_index.py4
2 files changed, 9 insertions, 9 deletions
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):
diff --git a/git/test/test_index.py b/git/test/test_index.py
index c7739ce8..9be4031d 100644
--- a/git/test/test_index.py
+++ b/git/test/test_index.py
@@ -882,10 +882,10 @@ class TestIndex(TestBase):
_make_hook(
index.repo.git_dir,
'commit-msg',
- 'echo -n " {0}" >> "$1"'.format(from_hook_message)
+ 'echo -n " {}" >> "$1"'.format(from_hook_message)
)
new_commit = index.commit(commit_message)
- self.assertEqual(new_commit.message, u"{0} {1}".format(commit_message, from_hook_message))
+ self.assertEqual(new_commit.message, u"{} {}".format(commit_message, from_hook_message))
@with_rw_repo('HEAD', bare=True)
def test_commit_msg_hook_fail(self, rw_repo):