Reformat entire project with ruff instead of black

This commit is contained in:
Rapptz
2025-08-18 20:15:44 -04:00
parent 3ef6272e07
commit 44a44e938f
88 changed files with 485 additions and 730 deletions

View File

@ -448,7 +448,7 @@ class DeletedReferencedMessage:
self._parent: MessageReference = parent
def __repr__(self) -> str:
return f"<DeletedReferencedMessage id={self.id} channel_id={self.channel_id} guild_id={self.guild_id!r}>"
return f'<DeletedReferencedMessage id={self.id} channel_id={self.channel_id} guild_id={self.guild_id!r}>'
@property
def id(self) -> int:
@ -883,7 +883,9 @@ class MessageInteractionMetadata(Hashable):
self.modal_interaction: Optional[MessageInteractionMetadata] = None
try:
self.modal_interaction = MessageInteractionMetadata(
state=state, guild=guild, data=data['triggering_interaction_metadata'] # type: ignore # EAFP
state=state,
guild=guild,
data=data['triggering_interaction_metadata'], # type: ignore # EAFP
)
except KeyError:
pass
@ -1748,8 +1750,7 @@ class PartialMessage(Hashable):
mention_author: bool = ...,
suppress_embeds: bool = ...,
silent: bool = ...,
) -> Message:
...
) -> Message: ...
@overload
async def reply(
@ -1764,8 +1765,7 @@ class PartialMessage(Hashable):
mention_author: bool = ...,
suppress_embeds: bool = ...,
silent: bool = ...,
) -> Message:
...
) -> Message: ...
@overload
async def reply(
@ -1785,8 +1785,7 @@ class PartialMessage(Hashable):
suppress_embeds: bool = ...,
silent: bool = ...,
poll: Poll = ...,
) -> Message:
...
) -> Message: ...
@overload
async def reply(
@ -1806,8 +1805,7 @@ class PartialMessage(Hashable):
suppress_embeds: bool = ...,
silent: bool = ...,
poll: Poll = ...,
) -> Message:
...
) -> Message: ...
@overload
async def reply(
@ -1827,8 +1825,7 @@ class PartialMessage(Hashable):
suppress_embeds: bool = ...,
silent: bool = ...,
poll: Poll = ...,
) -> Message:
...
) -> Message: ...
@overload
async def reply(
@ -1848,8 +1845,7 @@ class PartialMessage(Hashable):
suppress_embeds: bool = ...,
silent: bool = ...,
poll: Poll = ...,
) -> Message:
...
) -> Message: ...
async def reply(self, content: Optional[str] = None, **kwargs: Any) -> Message:
"""|coro|
@ -2726,19 +2722,19 @@ class Message(PartialMessage, Hashable):
if self.type is MessageType.new_member:
formats = [
"{0} joined the party.",
"{0} is here.",
"Welcome, {0}. We hope you brought pizza.",
"A wild {0} appeared.",
"{0} just landed.",
"{0} just slid into the server.",
"{0} just showed up!",
"Welcome {0}. Say hi!",
"{0} hopped into the server.",
"Everyone welcome {0}!",
'{0} joined the party.',
'{0} is here.',
'Welcome, {0}. We hope you brought pizza.',
'A wild {0} appeared.',
'{0} just landed.',
'{0} just slid into the server.',
'{0} just showed up!',
'Welcome {0}. Say hi!',
'{0} hopped into the server.',
'Everyone welcome {0}!',
"Glad you're here, {0}.",
"Good to see you, {0}.",
"Yay you made it, {0}!",
'Good to see you, {0}.',
'Yay you made it, {0}!',
]
created_at_ms = int(self.created_at.timestamp() * 1000)
@ -2797,7 +2793,7 @@ class Message(PartialMessage, Hashable):
if self.type is MessageType.thread_starter_message:
if self.reference is None or self.reference.resolved is None:
return 'Sorry, we couldn\'t load the first message in this thread'
return "Sorry, we couldn't load the first message in this thread"
# the resolved message for the reference will be a Message
return self.reference.resolved.content # type: ignore
@ -2867,7 +2863,7 @@ class Message(PartialMessage, Hashable):
embed.fields,
name='poll_question_text',
)
return f'{self.author.display_name}\'s poll {poll_title.value} has closed.' # type: ignore
return f"{self.author.display_name}'s poll {poll_title.value} has closed." # type: ignore
# Fallback for unknown message types
return ''