Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(pre-commit): pre-commit autoupdate #2517

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
# - --remove-duplicate-keys
# - --remove-unused-variables
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
Expand All @@ -28,7 +28,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
args: [--safe, --quiet]
Expand Down
2 changes: 1 addition & 1 deletion discord/audit_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class AuditLogDiff:
def __len__(self) -> int:
return len(self.__dict__)

def __iter__(self) -> Generator[tuple[str, Any], None, None]:
def __iter__(self) -> Generator[tuple[str, Any]]:
yield from self.__dict__.items()

def __repr__(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion discord/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ def inner(cls: type[SlashCommandGroup]) -> SlashCommandGroup:

slash_group = group

def walk_application_commands(self) -> Generator[ApplicationCommand, None, None]:
def walk_application_commands(self) -> Generator[ApplicationCommand]:
"""An iterator that recursively walks through all application commands and subcommands.

Yields
Expand Down
4 changes: 2 additions & 2 deletions discord/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ def get_poll(self, id: int, /) -> Poll | None:
"""
return self._connection.get_poll(id)

def get_all_channels(self) -> Generator[GuildChannel, None, None]:
def get_all_channels(self) -> Generator[GuildChannel]:
"""A generator that retrieves every :class:`.abc.GuildChannel` the client can 'access'.

This is equivalent to: ::
Expand All @@ -1065,7 +1065,7 @@ def get_all_channels(self) -> Generator[GuildChannel, None, None]:
for guild in self.guilds:
yield from guild.channels

def get_all_members(self) -> Generator[Member, None, None]:
def get_all_members(self) -> Generator[Member]:
"""Returns a generator with every :class:`.Member` the client can see.

This is equivalent to: ::
Expand Down
2 changes: 1 addition & 1 deletion discord/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def description(self) -> str:
def description(self, description: str) -> None:
self.__cog_description__ = description

def walk_commands(self) -> Generator[ApplicationCommand, None, None]:
def walk_commands(self) -> Generator[ApplicationCommand]:
"""An iterator that recursively walks through this cog's commands and subcommands.

Yields
Expand Down
2 changes: 1 addition & 1 deletion discord/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ async def call_after_hooks(self, ctx: ApplicationContext) -> None:
else:
await self._after_invoke(ctx) # type: ignore

def walk_commands(self) -> Generator[SlashCommand | SlashCommandGroup, None, None]:
def walk_commands(self) -> Generator[SlashCommand | SlashCommandGroup]:
"""An iterator that recursively walks through all slash commands and groups in this group.

Yields
Expand Down
2 changes: 1 addition & 1 deletion discord/ext/commands/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __new__(cls: type[CogT], *args: Any, **kwargs: Any) -> CogT:
# To do this, we need to interfere with the Cog creation process.
return super().__new__(cls)

def walk_commands(self) -> Generator[Command, None, None]:
def walk_commands(self) -> Generator[Command]:
"""An iterator that recursively walks through this cog's commands and subcommands.

Yields
Expand Down
2 changes: 1 addition & 1 deletion discord/ext/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ def remove_command(self, name: str) -> Command[CogT, Any, Any] | None:
self.prefixed_commands[alias] = cmd
return command

def walk_commands(self) -> Generator[Command[CogT, Any, Any], None, None]:
def walk_commands(self) -> Generator[Command[CogT, Any, Any]]:
"""An iterator that recursively walks through all commands and subcommands.

.. versionchanged:: 1.4
Expand Down
6 changes: 3 additions & 3 deletions discord/oggparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, stream: IO[bytes]) -> None:
except Exception:
raise OggError("bad data stream") from None

def iter_packets(self) -> Generator[tuple[bytes, bool], None, None]:
def iter_packets(self) -> Generator[tuple[bytes, bool]]:
packetlen = offset = 0
partial = True

Expand Down Expand Up @@ -106,13 +106,13 @@ def _next_page(self) -> OggPage | None:
else:
raise OggError("invalid header magic")

def _iter_pages(self) -> Generator[OggPage, None, None]:
def _iter_pages(self) -> Generator[OggPage]:
page = self._next_page()
while page:
yield page
page = self._next_page()

def iter_packets(self) -> Generator[bytes, None, None]:
def iter_packets(self) -> Generator[bytes]:
partial = b""
for page in self._iter_pages():
for data, complete in page.iter_packets():
Expand Down
Loading