aboutsummaryrefslogtreecommitdiff
path: root/discord/ext/commands/cooldowns.py
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/commands/cooldowns.py
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/commands/cooldowns.py')
-rw-r--r--discord/ext/commands/cooldowns.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/ext/commands/cooldowns.py b/discord/ext/commands/cooldowns.py
index 7cfc9fd7..fc438c9f 100644
--- a/discord/ext/commands/cooldowns.py
+++ b/discord/ext/commands/cooldowns.py
@@ -131,7 +131,7 @@ class Cooldown:
return Cooldown(self.rate, self.per, self.type)
def __repr__(self):
- return '<Cooldown rate: {0.rate} per: {0.per} window: {0._window} tokens: {0._tokens}>'.format(self)
+ return f'<Cooldown rate: {self.rate} per: {self.per} window: {self._window} tokens: {self._tokens}>'
class CooldownMapping:
def __init__(self, original):
@@ -202,7 +202,7 @@ class _Semaphore:
self._waiters = deque()
def __repr__(self):
- return '<_Semaphore value={0.value} waiters={1}>'.format(self, len(self._waiters))
+ return f'<_Semaphore value={self.value} waiters={len(self._waiters)}>'
def locked(self):
return self.value == 0
@@ -259,7 +259,7 @@ class MaxConcurrency:
return self.__class__(self.number, per=self.per, wait=self.wait)
def __repr__(self):
- return '<MaxConcurrency per={0.per!r} number={0.number} wait={0.wait}>'.format(self)
+ return f'<MaxConcurrency per={self.per!r} number={self.number} wait={self.wait}>'
def get_key(self, message):
return self.per.get_key(message)