Skip to content
Merged
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 discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def _sync(self, data: GuildPayload) -> None:
if "channels" in data:
channels = data["channels"]
for c in channels:
factory, ch_type = _guild_channel_factory(c["type"])
factory, _ch_type = _guild_channel_factory(c["type"])
if factory:
self._add_channel(factory(guild=self, data=c, state=self._state)) # type: ignore

Expand Down Expand Up @@ -1885,7 +1885,7 @@ async def fetch_channels(self) -> Sequence[GuildChannel]:
data = await self._state.http.get_all_guild_channels(self.id)

def convert(d):
factory, ch_type = _guild_channel_factory(d["type"])
factory, _ch_type = _guild_channel_factory(d["type"])
if factory is None:
raise InvalidData("Unknown channel type {type} for channel ID {id}.".format_map(d))

Expand Down
2 changes: 1 addition & 1 deletion discord/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ def parse_channel_update(self, data) -> None:
)

def parse_channel_create(self, data) -> None:
factory, ch_type = _channel_factory(data["type"])
factory, _ch_type = _channel_factory(data["type"])
if factory is None:
_log.debug(
"CHANNEL_CREATE referencing an unknown channel type %s. Discarding.",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_typing_annotated.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async def echo(self, ctx, txt: Annotated[str, discord.Option(description="Some t


def test_typing_annotated_optional():
async def echo(ctx, txt: Annotated[Optional[str], discord.Option()]):
async def echo(ctx, txt: Annotated[str | None, discord.Option()]):
await ctx.respond(txt)

cmd = SlashCommand(echo)
Expand Down