Skip to content

Commit d2af55a

Browse files
committed
🎨 Lint &/ format code
1 parent 306c879 commit d2af55a

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

src/__main__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import sys; import os; sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) # noqa: E702
1+
import sys
2+
import os
3+
4+
sys.path.insert(
5+
0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
6+
) # noqa: E702
27
# the above line allows us to import from src without any issues whilst using src/__main__.py
38
from src.config import config
49
import importlib.util
@@ -31,6 +36,7 @@ async def pre_main():
3136
# we import main here to apply patches before importing the most things we can
3237
# and allow the patches to be applied to later imported modules
3338
from src.start import main
39+
3440
await main()
3541

3642

src/extensions/nice-errors/handler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,7 @@ async def handle_error(
2525
message = "Whoops! An error occurred while executing this command"
2626
if out:
2727
message += f"\n\n-# This error has been reported to the developers - `{out}`"
28-
await ctx.respond(message, ephemeral=True) # pyright: ignore[reportUnknownMemberType]
28+
await ctx.respond(
29+
message, ephemeral=True
30+
) # pyright: ignore[reportUnknownMemberType]
2931
raise error

src/extensions/nice-errors/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ async def on_error(
3030
):
3131
await handle_error(error, ctx, self.sentry_sdk)
3232

33+
3334
def setup(bot: discord.Bot, config: dict[str, Any]) -> None:
3435
bot.add_cog(NiceErrors(bot, bool(config.get("sentry", {}).get("dsn"))))

src/extensions/nice-errors/patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from typing import Any
22
from .handler import handle_error
33

4+
45
async def patch(config: dict[str, Any]):
56
sentry_sdk = None
67
if config.get("sentry", {}).get("dsn"):

0 commit comments

Comments
 (0)