Use f-strings in more places that were missed.

This commit is contained in:
Rapptz
2021-04-08 06:02:47 -04:00
parent c3e0b6e123
commit 99fc950510
34 changed files with 220 additions and 143 deletions

View File

@ -31,6 +31,7 @@ __all__ = (
'AppInfo',
)
class AppInfo:
"""Represents the application info for the bot provided by Discord.
@ -95,10 +96,25 @@ class AppInfo:
.. versionadded:: 1.3
"""
__slots__ = ('_state', 'description', 'id', 'name', 'rpc_origins',
'bot_public', 'bot_require_code_grant', 'owner', 'icon',
'summary', 'verify_key', 'team', 'guild_id', 'primary_sku_id',
'slug', 'cover_image')
__slots__ = (
'_state',
'description',
'id',
'name',
'rpc_origins',
'bot_public',
'bot_require_code_grant',
'owner',
'icon',
'summary',
'verify_key',
'team',
'guild_id',
'primary_sku_id',
'slug',
'cover_image',
)
def __init__(self, state, data):
self._state = state
@ -125,8 +141,11 @@ class AppInfo:
self.cover_image = data.get('cover_image')
def __repr__(self):
return '<{0.__class__.__name__} id={0.id} name={0.name!r} description={0.description!r} public={0.bot_public} ' \
'owner={0.owner!r}>'.format(self)
return (
f'<{self.__class__.__name__} id={self.id} name={self.name!r} '
f'description={self.description!r} public={self.bot_public} '
f'owner={self.owner!r}>'
)
@property
def icon_url(self):
@ -166,7 +185,6 @@ class AppInfo:
"""
return Asset._from_icon(self._state, self, 'app', format=format, size=size)
@property
def cover_image_url(self):
""":class:`.Asset`: Retrieves the cover image on a store embed.