Skip to content

Commit

Permalink
chore: run updated black over the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Skelmis committed Mar 29, 2024
1 parent 86afbc8 commit 65e061a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 30 deletions.
3 changes: 1 addition & 2 deletions suggestions/abc/loadable.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@

@runtime_checkable
class Loadable(Protocol):
async def load(self):
...
async def load(self): ...
6 changes: 2 additions & 4 deletions suggestions/cogs/blacklist_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ def __init__(self, bot):
self.state: State = self.bot.state

@commands.slash_command()
async def user(self, interaction: disnake.GuildCommandInteraction):
...
async def user(self, interaction: disnake.GuildCommandInteraction): ...

@user.sub_command_group()
async def blocklist(self, interaction: disnake.GuildCommandInteraction):
...
async def blocklist(self, interaction: disnake.GuildCommandInteraction): ...

@blocklist.sub_command()
async def add(
Expand Down
18 changes: 9 additions & 9 deletions suggestions/cogs/help_guild_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ async def instance_info(
cluster_id = (
1
if shard_id < 10
else 2
if shard_id < 20
else 3
if shard_id < 30
else 4
if shard_id < 40
else 5
if shard_id < 50
else 6
else (
2
if shard_id < 20
else (
3
if shard_id < 30
else 4 if shard_id < 40 else 5 if shard_id < 50 else 6
)
)
)

await interaction.send(
Expand Down
5 changes: 2 additions & 3 deletions suggestions/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ class BlocklistedUser(CheckFailure):
class PartialResponse(Exception):
"""A garven route returned a partial response when we require a full response"""


class ConflictingHandlerInformation(disnake.DiscordException):
"""Raised when an InteractionHandler class gets both content and a translation key"""


class InvalidFileType(disnake.DiscordException):
"""The file you attempted to upload is not allowed."""

12 changes: 4 additions & 8 deletions suggestions/low_level/message_editing.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ async def edit(
allowed_mentions: Optional[AllowedMentions] = ...,
view: Optional[View] = ...,
components: Optional[Components[MessageUIComponent]] = ...,
) -> None:
...
) -> None: ...

@overload
async def edit(
Expand All @@ -54,8 +53,7 @@ async def edit(
allowed_mentions: Optional[AllowedMentions] = ...,
view: Optional[View] = ...,
components: Optional[Components[MessageUIComponent]] = ...,
) -> None:
...
) -> None: ...

@overload
async def edit(
Expand All @@ -70,8 +68,7 @@ async def edit(
allowed_mentions: Optional[AllowedMentions] = ...,
view: Optional[View] = ...,
components: Optional[Components[MessageUIComponent]] = ...,
) -> None:
...
) -> None: ...

@overload
async def edit(
Expand All @@ -86,8 +83,7 @@ async def edit(
allowed_mentions: Optional[AllowedMentions] = ...,
view: Optional[View] = ...,
components: Optional[Components[MessageUIComponent]] = ...,
) -> None:
...
) -> None: ...

async def edit(self, content: Optional[str] = MISSING, **fields: Any) -> None:
if self._state.allowed_mentions is not None:
Expand Down
1 change: 1 addition & 0 deletions suggestions/telemetry/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This module is standalone for the bot but provides
useful insights and telemetry to repeated information.
"""

import asyncio
import shutil
from pathlib import Path
Expand Down
6 changes: 2 additions & 4 deletions tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ async def assert_stats_count(
member_id: int,
guild_id: int,
should_be_none: bool,
):
...
): ...


@overload
Expand All @@ -26,8 +25,7 @@ async def assert_stats_count(
field: str,
success_count: int = 0,
failure_count: int = 0,
):
...
): ...


async def assert_stats_count(
Expand Down
1 change: 1 addition & 0 deletions tests/test_disnake.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests library modifications to ensure changes work"""

from unittest.mock import Mock

import disnake
Expand Down

0 comments on commit 65e061a

Please sign in to comment.