aboutsummaryrefslogtreecommitdiff
path: root/discord/ext/tasks
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-04-08 06:02:47 -0400
committerRapptz <[email protected]>2021-04-08 06:02:47 -0400
commit99fc9505107183faa59aad9e7753f293eba88836 (patch)
treef615ac678c5dc194fd2aa3a9a048a188b761b0d9 /discord/ext/tasks
parentUpdate joined command in basic_bot to use f-strings (diff)
downloaddiscord.py-99fc9505107183faa59aad9e7753f293eba88836.tar.xz
discord.py-99fc9505107183faa59aad9e7753f293eba88836.zip
Use f-strings in more places that were missed.
Diffstat (limited to 'discord/ext/tasks')
-rw-r--r--discord/ext/tasks/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py
index 4c587e86..240fc42e 100644
--- a/discord/ext/tasks/__init__.py
+++ b/discord/ext/tasks/__init__.py
@@ -75,7 +75,7 @@ class Loop:
self._next_iteration = None
if not inspect.iscoroutinefunction(self.coro):
- raise TypeError('Expected coroutine function, not {0.__name__!r}.'.format(type(self.coro)))
+ raise TypeError(f'Expected coroutine function, not {type(self.coro).__name__!r}.')
async def _call_loop_function(self, name, *args, **kwargs):
coro = getattr(self, '_' + name)
@@ -370,7 +370,7 @@ class Loop:
"""
if not inspect.iscoroutinefunction(coro):
- raise TypeError('Expected coroutine function, received {0.__name__!r}.'.format(type(coro)))
+ raise TypeError(f'Expected coroutine function, received {coro.__class__.__name__!r}.')
self._before_loop = coro
return coro
@@ -398,7 +398,7 @@ class Loop:
"""
if not inspect.iscoroutinefunction(coro):
- raise TypeError('Expected coroutine function, received {0.__name__!r}.'.format(type(coro)))
+ raise TypeError(f'Expected coroutine function, received {coro.__class__.__name__!r}.')
self._after_loop = coro
return coro
@@ -424,7 +424,7 @@ class Loop:
The function was not a coroutine.
"""
if not inspect.iscoroutinefunction(coro):
- raise TypeError('Expected coroutine function, received {0.__name__!r}.'.format(type(coro)))
+ raise TypeError(f'Expected coroutine function, received {coro.__class__.__name__!r}.')
self._error = coro
return coro