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/mentions.py | |
| 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/mentions.py')
| -rw-r--r-- | discord/mentions.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/discord/mentions.py b/discord/mentions.py index 5b2a32e1..57b1e3fc 100644 --- a/discord/mentions.py +++ b/discord/mentions.py @@ -26,6 +26,7 @@ __all__ = ( 'AllowedMentions', ) + class _FakeBool: def __repr__(self): return 'True' @@ -36,8 +37,10 @@ class _FakeBool: def __bool__(self): return True + default = _FakeBool() + class AllowedMentions: """A class that represents what mentions are allowed in a message. @@ -126,4 +129,7 @@ class AllowedMentions: return AllowedMentions(everyone=everyone, roles=roles, users=users, replied_user=replied_user) def __repr__(self): - return '{0.__class__.__qualname__}(everyone={0.everyone}, users={0.users}, roles={0.roles}, replied_user={0.replied_user})'.format(self) + return ( + f'{self.__class__.__name__}(everyone={self.everyone}, ' + f'users={self.users}, roles={self.roles}, replied_user={self.replied_user})' + ) |