Skip to content

Commit 449143f

Browse files
committed
🎨 Format code
1 parent ae17651 commit 449143f

File tree

9 files changed

+5
-17
lines changed

9 files changed

+5
-17
lines changed

scripts/check_listings/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from bs4 import BeautifulSoup
99

1010
from .listings import (
11-
Listing,
1211
normalize_soup,
1312
TopGg,
1413
DiscordsCom,

scripts/check_listings/listings/DiscordsCom.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import nodriver as uc
22

33
from bs4 import BeautifulSoup
4-
from asyncio import TimeoutError
54

65
from .Listing import Listing, NotFoundError
76

scripts/check_listings/listings/Listing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import nodriver as uc
2-
import re
32

43
from abc import ABC, abstractmethod
54
from bs4 import BeautifulSoup

scripts/check_listings/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from bs4 import BeautifulSoup
99

1010
from .listings import (
11-
Listing,
1211
normalize_soup,
1312
TopGg,
1413
DiscordsCom,

src/__main__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import sys
22
import os
33

4-
sys.path.insert(
5-
0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
6-
) # noqa: E702
4+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) # noqa: E702
75
# the above line allows us to import from src without any issues whilst using src/__main__.py
86
from src.config import config
97
import importlib.util
@@ -41,5 +39,4 @@ async def pre_main():
4139

4240

4341
if __name__ == "__main__":
44-
4542
asyncio.run(pre_main())

src/config/bot_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212

1313
def load_from_env() -> dict[str, dict[str, Any]]:
14-
1514
_config = {}
1615
values = {k: v for k, v in os.environ.items() if k.startswith(f"BOTKIT{SPLIT}")}
1716
values = {k[len(f"BOTKIT{SPLIT}") :]: v for k, v in values.items()}

src/extensions/add-dm/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import discord
2-
import aiohttp
32

4-
from quart import Quart
53
from discord.ext import commands
64
from schema import Schema
75
from src.log import logger
@@ -37,7 +35,7 @@ async def on_join(self, guild: discord.Guild):
3735
try:
3836
await user.send(self.config["message"].format(user=user))
3937
except discord.Forbidden:
40-
logger.warning(f"Failed to send DM when joining a guild")
38+
logger.warning("Failed to send DM when joining a guild")
4139

4240

4341
def setup(bot: discord.Bot, config: dict) -> None:

src/extensions/nice-errors/handler.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,5 @@ 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(
29-
message, ephemeral=True
30-
) # pyright: ignore[reportUnknownMemberType]
28+
await ctx.respond(message, ephemeral=True) # pyright: ignore[reportUnknownMemberType]
3129
raise error

src/utils/extensions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def validate_module(module: ModuleType, config: dict[str, Any] | None = None) ->
7474
"enabled" in module.default
7575
), f"Extension {module.__name__} does not have an enabled key in its default configuration"
7676
if hasattr(module, "schema"):
77-
assert isinstance(module.schema, Schema) or isinstance(
78-
module.schema, dict
77+
assert (
78+
isinstance(module.schema, Schema) or isinstance(module.schema, dict)
7979
), f"Extension {module.__name__} has a schema of type {type(module.schema)} instead of Schema or dict"
8080

8181
if isinstance(module.schema, dict):

0 commit comments

Comments
 (0)