Kaydet (Commit) 6072e0bf authored tarafından Brett Cannon's avatar Brett Cannon

Remove uses of % with str.format.

üst 5c3283e4
...@@ -237,7 +237,7 @@ class _ModuleLock: ...@@ -237,7 +237,7 @@ class _ModuleLock:
self.wakeup.release() self.wakeup.release()
def __repr__(self): def __repr__(self):
return "_ModuleLock(%r) at %d" % (self.name, id(self)) return "_ModuleLock({!r}) at {}".format(self.name, id(self))
class _DummyModuleLock: class _DummyModuleLock:
...@@ -258,7 +258,7 @@ class _DummyModuleLock: ...@@ -258,7 +258,7 @@ class _DummyModuleLock:
self.count -= 1 self.count -= 1
def __repr__(self): def __repr__(self):
return "_DummyModuleLock(%r) at %d" % (self.name, id(self)) return "_DummyModuleLock({!r}) at {}".format(self.name, id(self))
# The following two functions are for consumption by Python/import.c. # The following two functions are for consumption by Python/import.c.
...@@ -1434,7 +1434,7 @@ class FileFinder: ...@@ -1434,7 +1434,7 @@ class FileFinder:
return path_hook_for_FileFinder return path_hook_for_FileFinder
def __repr__(self): def __repr__(self):
return "FileFinder(%r)" % (self.path,) return "FileFinder({!r})".format(self.path)
# Import itself ############################################################### # Import itself ###############################################################
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment