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

@ -116,7 +116,7 @@ if TYPE_CHECKING:
PartialMessageableChannel = Union[TextChannel, VoiceChannel, StageChannel, Thread, DMChannel, PartialMessageable]
MessageableChannel = Union[PartialMessageableChannel, GroupChannel]
SnowflakeTime = Union["Snowflake", datetime]
SnowflakeTime = Union['Snowflake', datetime]
class PinnedMessage(Message):
pinned_at: datetime
@ -140,7 +140,7 @@ class _PinsIterator:
def __await__(self) -> Generator[Any, None, List[PinnedMessage]]:
warnings.warn(
"`await <channel>.pins()` is deprecated; use `async for message in <channel>.pins()` instead.",
'`await <channel>.pins()` is deprecated; use `async for message in <channel>.pins()` instead.',
DeprecationWarning,
stacklevel=2,
)
@ -423,8 +423,7 @@ class GuildChannel:
if TYPE_CHECKING:
def __init__(self, *, state: ConnectionState, guild: Guild, data: GuildChannelPayload):
...
def __init__(self, *, state: ConnectionState, guild: Guild, data: GuildChannelPayload): ...
def __str__(self) -> str:
return self.name
@ -794,7 +793,6 @@ class GuildChannel:
default = self.guild.default_role
if default is None:
if self._state.self_id == obj.id:
return Permissions._user_installed_permissions(in_guild=True)
else:
@ -907,8 +905,7 @@ class GuildChannel:
*,
overwrite: Optional[Union[PermissionOverwrite, _Undefined]] = ...,
reason: Optional[str] = ...,
) -> None:
...
) -> None: ...
@overload
async def set_permissions(
@ -917,8 +914,7 @@ class GuildChannel:
*,
reason: Optional[str] = ...,
**permissions: Unpack[_PermissionOverwriteKwargs],
) -> None:
...
) -> None: ...
async def set_permissions(
self,
@ -1109,8 +1105,7 @@ class GuildChannel:
category: Optional[Snowflake] = MISSING,
sync_permissions: bool = MISSING,
reason: Optional[str] = MISSING,
) -> None:
...
) -> None: ...
@overload
async def move(
@ -1121,8 +1116,7 @@ class GuildChannel:
category: Optional[Snowflake] = MISSING,
sync_permissions: bool = MISSING,
reason: str = MISSING,
) -> None:
...
) -> None: ...
@overload
async def move(
@ -1133,8 +1127,7 @@ class GuildChannel:
category: Optional[Snowflake] = MISSING,
sync_permissions: bool = MISSING,
reason: str = MISSING,
) -> None:
...
) -> None: ...
@overload
async def move(
@ -1145,8 +1138,7 @@ class GuildChannel:
category: Optional[Snowflake] = MISSING,
sync_permissions: bool = MISSING,
reason: str = MISSING,
) -> None:
...
) -> None: ...
async def move(self, **kwargs: Any) -> None:
"""|coro|
@ -1428,8 +1420,7 @@ class Messageable:
view: LayoutView,
suppress_embeds: bool = ...,
silent: bool = ...,
) -> Message:
...
) -> Message: ...
@overload
async def send(
@ -1444,8 +1435,7 @@ class Messageable:
view: LayoutView,
suppress_embeds: bool = ...,
silent: bool = ...,
) -> Message:
...
) -> Message: ...
@overload
async def send(
@ -1465,8 +1455,7 @@ class Messageable:
suppress_embeds: bool = ...,
silent: bool = ...,
poll: Poll = ...,
) -> Message:
...
) -> Message: ...
@overload
async def send(
@ -1486,8 +1475,7 @@ class Messageable:
suppress_embeds: bool = ...,
silent: bool = ...,
poll: Poll = ...,
) -> Message:
...
) -> Message: ...
@overload
async def send(
@ -1507,8 +1495,7 @@ class Messageable:
suppress_embeds: bool = ...,
silent: bool = ...,
poll: Poll = ...,
) -> Message:
...
) -> Message: ...
@overload
async def send(
@ -1528,8 +1515,7 @@ class Messageable:
suppress_embeds: bool = ...,
silent: bool = ...,
poll: Poll = ...,
) -> Message:
...
) -> Message: ...
async def send(
self,
@ -2029,7 +2015,7 @@ class Messageable:
if limit is None:
raise ValueError('history does not support around with limit=None')
if limit > 101:
raise ValueError("history max limit 101 when specifying around parameter")
raise ValueError('history max limit 101 when specifying around parameter')
# Strange Discord quirk
limit = 100 if limit == 101 else limit