mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-09 17:59:04 +00:00
Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by default. It also changes some methods to use `yield from`.
This commit is contained in:
1 parent
9fc2ab9c99
commit
9d39b135f4
67 files changed
+262
-378
No files matched your search
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,8 +24,8 @@ DEALINGS IN THE SOFTWARE.
|
||||
|
||||
class _RawReprMixin:
|
||||
def __repr__(self):
|
||||
value = ' '.join('%s=%r' % (attr, getattr(self, attr)) for attr in self.__slots__)
|
||||
return '<%s %s>' % (self.__class__.__name__, value)
|
||||
value = ' '.join(f'{attr}={getattr(self, attr)!r}' for attr in self.__slots__)
|
||||
return f'<{self.__class__.__name__} {value}>'
|
||||
|
||||
class RawMessageDeleteEvent(_RawReprMixin):
|
||||
"""Represents the event payload for a :func:`on_raw_message_delete` event.
|
||||
|
||||
Reference in new issue
Block a user