Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a4a3020

Browse files
bpo-32157: Removed explicit quotes around %r and {!r}. (#4582)
1 parent c615be5 commit a4a3020

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Lib/imaplib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ def _match(self, cre, s):
11661166
self.mo = cre.match(s)
11671167
if __debug__:
11681168
if self.mo is not None and self.debug >= 5:
1169-
self._mesg("\tmatched r'%r' => %r" % (cre.pattern, self.mo.groups()))
1169+
self._mesg("\tmatched %r => %r" % (cre.pattern, self.mo.groups()))
11701170
return self.mo is not None
11711171

11721172

Lib/inspect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ def getclosurevars(func):
13811381
func = func.__func__
13821382

13831383
if not isfunction(func):
1384-
raise TypeError("'{!r}' is not a Python function".format(func))
1384+
raise TypeError("{!r} is not a Python function".format(func))
13851385

13861386
code = func.__code__
13871387
# Nonlocal references are named in co_freevars and resolved
@@ -1624,7 +1624,7 @@ def getgeneratorlocals(generator):
16241624
bound values."""
16251625

16261626
if not isgenerator(generator):
1627-
raise TypeError("'{!r}' is not a Python generator".format(generator))
1627+
raise TypeError("{!r} is not a Python generator".format(generator))
16281628

16291629
frame = getattr(generator, "gi_frame", None)
16301630
if frame is not None:

Lib/multiprocessing/sharedctypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def Value(typecode_or_type, *args, lock=True, ctx=None):
7878
ctx = ctx or get_context()
7979
lock = ctx.RLock()
8080
if not hasattr(lock, 'acquire'):
81-
raise AttributeError("'%r' has no method 'acquire'" % lock)
81+
raise AttributeError("%r has no method 'acquire'" % lock)
8282
return synchronized(obj, lock, ctx=ctx)
8383

8484
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):
9292
ctx = ctx or get_context()
9393
lock = ctx.RLock()
9494
if not hasattr(lock, 'acquire'):
95-
raise AttributeError("'%r' has no method 'acquire'" % lock)
95+
raise AttributeError("%r has no method 'acquire'" % lock)
9696
return synchronized(obj, lock, ctx=ctx)
9797

9898
def copy(obj):

Lib/test/test_queue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def do_blocking_test(self, block_func, block_args, trigger_func, trigger_args):
5454
self.result = block_func(*block_args)
5555
# If block_func returned before our thread made the call, we failed!
5656
if not thread.startedEvent.is_set():
57-
self.fail("blocking function '%r' appeared not to block" %
57+
self.fail("blocking function %r appeared not to block" %
5858
block_func)
5959
return self.result
6060
finally:

0 commit comments

Comments
 (0)