From ada27a855934588cf753f8712bd72d41eadb1058 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 1 Sep 2019 18:20:32 -0400 Subject: No need for format indexes (mostly) --- coverage/debug.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'coverage/debug.py') diff --git a/coverage/debug.py b/coverage/debug.py index 29e4977f..6e6b1df1 100644 --- a/coverage/debug.py +++ b/coverage/debug.py @@ -101,7 +101,7 @@ class NoDebugging(object): def info_header(label): """Make a nice header string.""" - return "--{0:-<60s}".format(" "+label+" ") + return "--{:-<60s}".format(" "+label+" ") def info_formatter(info): @@ -174,8 +174,8 @@ def short_id(id64): def add_pid_and_tid(text): """A filter to add pid and tid to debug messages.""" # Thread ids are useful, but too long. Make a shorter one. - tid = "{0:04x}".format(short_id(_thread.get_ident())) - text = "{0:5d}.{1}: {2}".format(os.getpid(), tid, text) + tid = "{:04x}".format(short_id(_thread.get_ident())) + text = "{:5d}.{}: {}".format(os.getpid(), tid, text) return text @@ -241,7 +241,7 @@ class CwdTracker(object): # pragma: debugging """Add a cwd message for each new cwd.""" cwd = os.getcwd() if cwd != self.cwd: - text = "cwd is now {0!r}\n".format(cwd) + text + text = "cwd is now {!r}\n".format(cwd) + text self.cwd = cwd return text -- cgit v1.2.1