summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-11-28 20:54:42 (GMT)
committerGitHub <noreply@github.com>2017-11-28 20:54:42 (GMT)
commita4a3020abc065d40f57069d6c69d02222ddc85d6 (patch)
tree204e84c1c4050c001f9d0f1fa8c8f509e4fd8e2e /Lib
parentc615be5166ed338c052fa67fe781b9bfe0dfb78c (diff)
downloadcpython-a4a3020abc065d40f57069d6c69d02222ddc85d6.zip
cpython-a4a3020abc065d40f57069d6c69d02222ddc85d6.tar.gz
cpython-a4a3020abc065d40f57069d6c69d02222ddc85d6.tar.bz2
bpo-32157: Removed explicit quotes around %r and {!r}. (#4582)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/imaplib.py2
-rw-r--r--Lib/inspect.py4
-rw-r--r--Lib/multiprocessing/sharedctypes.py4
-rw-r--r--Lib/test/test_queue.py2
4 files changed, 6 insertions, 6 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index 1c0b03b..e1cece0 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -1166,7 +1166,7 @@ class IMAP4:
self.mo = cre.match(s)
if __debug__:
if self.mo is not None and self.debug >= 5:
- self._mesg("\tmatched r'%r' => %r" % (cre.pattern, self.mo.groups()))
+ self._mesg("\tmatched %r => %r" % (cre.pattern, self.mo.groups()))
return self.mo is not None
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 69f2b62..8c121ce 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -1381,7 +1381,7 @@ def getclosurevars(func):
func = func.__func__
if not isfunction(func):
- raise TypeError("'{!r}' is not a Python function".format(func))
+ raise TypeError("{!r} is not a Python function".format(func))
code = func.__code__
# Nonlocal references are named in co_freevars and resolved
@@ -1624,7 +1624,7 @@ def getgeneratorlocals(generator):
bound values."""
if not isgenerator(generator):
- raise TypeError("'{!r}' is not a Python generator".format(generator))
+ raise TypeError("{!r} is not a Python generator".format(generator))
frame = getattr(generator, "gi_frame", None)
if frame is not None:
diff --git a/Lib/multiprocessing/sharedctypes.py b/Lib/multiprocessing/sharedctypes.py
index 066cf8f..6071707 100644
--- a/Lib/multiprocessing/sharedctypes.py
+++ b/Lib/multiprocessing/sharedctypes.py
@@ -78,7 +78,7 @@ def Value(typecode_or_type, *args, lock=True, ctx=None):
ctx = ctx or get_context()
lock = ctx.RLock()
if not hasattr(lock, 'acquire'):
- raise AttributeError("'%r' has no method 'acquire'" % lock)
+ raise AttributeError("%r has no method 'acquire'" % lock)
return synchronized(obj, lock, ctx=ctx)
def Array(typecode_or_type, size_or_initializer, *, lock=True, ctx=None):
@@ -92,7 +92,7 @@ def Array(typecode_or_type, size_or_initializer, *, lock=True, ctx=None):
ctx = ctx or get_context()
lock = ctx.RLock()
if not hasattr(lock, 'acquire'):
- raise AttributeError("'%r' has no method 'acquire'" % lock)
+ raise AttributeError("%r has no method 'acquire'" % lock)
return synchronized(obj, lock, ctx=ctx)
def copy(obj):
diff --git a/Lib/test/test_queue.py b/Lib/test/test_queue.py
index 35466c1..6ee906c 100644
--- a/Lib/test/test_queue.py
+++ b/Lib/test/test_queue.py
@@ -54,7 +54,7 @@ class BlockingTestMixin:
self.result = block_func(*block_args)
# If block_func returned before our thread made the call, we failed!
if not thread.startedEvent.is_set():
- self.fail("blocking function '%r' appeared not to block" %
+ self.fail("blocking function %r appeared not to block" %
block_func)
return self.result
finally: