diff options
| author | Rapptz <[email protected]> | 2021-04-08 06:02:47 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-04-08 06:02:47 -0400 |
| commit | 99fc9505107183faa59aad9e7753f293eba88836 (patch) | |
| tree | f615ac678c5dc194fd2aa3a9a048a188b761b0d9 /discord/ext/tasks | |
| parent | Update joined command in basic_bot to use f-strings (diff) | |
| download | discord.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__.py | 8 |
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 |