Skip to content

Commit 770e7ba

Browse files
authored
chore: 🚨 Fix linter screaming (#128)
1 parent 049d407 commit 770e7ba

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

discord/guild.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def _sync(self, data: GuildPayload) -> None:
534534
if "channels" in data:
535535
channels = data["channels"]
536536
for c in channels:
537-
factory, ch_type = _guild_channel_factory(c["type"])
537+
factory, _ch_type = _guild_channel_factory(c["type"])
538538
if factory:
539539
self._add_channel(factory(guild=self, data=c, state=self._state)) # type: ignore
540540

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

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

discord/state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ def parse_channel_update(self, data) -> None:
985985
)
986986

987987
def parse_channel_create(self, data) -> None:
988-
factory, ch_type = _channel_factory(data["type"])
988+
factory, _ch_type = _channel_factory(data["type"])
989989
if factory is None:
990990
_log.debug(
991991
"CHANNEL_CREATE referencing an unknown channel type %s. Discarding.",

tests/test_typing_annotated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async def echo(self, ctx, txt: Annotated[str, discord.Option(description="Some t
7777

7878

7979
def test_typing_annotated_optional():
80-
async def echo(ctx, txt: Annotated[Optional[str], discord.Option()]):
80+
async def echo(ctx, txt: Annotated[str | None, discord.Option()]):
8181
await ctx.respond(txt)
8282

8383
cmd = SlashCommand(echo)

0 commit comments

Comments
 (0)