Skip to content

Commit 461e59e

Browse files
committed
use format string
1 parent 6460ea1 commit 461e59e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/unittest/mock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,8 +1590,8 @@ def _get_target(target):
15901590
try:
15911591
target, attribute = target.rsplit('.', 1)
15921592
except (TypeError, ValueError, AttributeError):
1593-
raise TypeError("Need a valid target to patch. You supplied: %r" %
1594-
(target,))
1593+
raise TypeError(
1594+
f"Need a valid target to patch. You supplied: {target!r}")
15951595
return partial(pkgutil.resolve_name, target), attribute
15961596

15971597

0 commit comments

Comments
 (0)