Use f-strings in more places that were missed.

This commit is contained in:
Rapptz
2021-04-08 06:02:47 -04:00
parent c3e0b6e123
commit 99fc950510
34 changed files with 220 additions and 143 deletions

View File

@ -846,7 +846,7 @@ class BotBase(GroupMixin):
raise
raise TypeError("command_prefix must be plain string, iterable of strings, or callable "
"returning either of these, not {}".format(ret.__class__.__name__))
f"returning either of these, not {ret.__class__.__name__}")
if not ret:
raise ValueError("Iterable command_prefix must contain at least one prefix")
@ -907,13 +907,13 @@ class BotBase(GroupMixin):
except TypeError:
if not isinstance(prefix, list):
raise TypeError("get_prefix must return either a string or a list of string, "
"not {}".format(prefix.__class__.__name__))
f"not {prefix.__class__.__name__}")
# It's possible a bad command_prefix got us here.
for value in prefix:
if not isinstance(value, str):
raise TypeError("Iterable command_prefix or list returned from get_prefix must "
"contain only strings, not {}".format(value.__class__.__name__))
f"contain only strings, not {value.__class__.__name__}")
# Getting here shouldn't happen
raise