Skip to content

Commit af2b9e6

Browse files
committed
🎨 Various small changes
1 parent 9caf931 commit af2b9e6

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed

pdm.lock

Lines changed: 31 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/config/bot_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ def load_json_recursive(data: dict[str, Any]) -> dict[str, Any]:
5858
elif os.path.exists("config.yml"):
5959
path = "config.yml"
6060

61-
61+
config: dict[str, dict[str, Any]]
6262
if path:
6363
# noinspection PyArgumentEqualDefault
6464
with open(path, "r", encoding="utf-8") as f:
65-
config: dict[str, dict[str, Any]] = yaml.safe_load(f)
65+
config = yaml.safe_load(f)
6666
else:
67-
config: dict[str, dict[str, Any]] = load_from_env()
67+
config = load_from_env()
6868

6969

7070
def store_config() -> None:

src/extensions/status-post/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ class Status(commands.Cog):
2626
def __init__(self, bot: discord.Bot, config: dict):
2727
self.bot = bot
2828
self.config = config
29-
self.push_status_loop = tasks.loop(seconds=self.config["every"])(self.push_status_loop)
29+
self.push_status_loop = tasks.loop(seconds=self.config["every"])(
30+
self.push_status_loop
31+
)
3032

3133
@commands.Cog.listener(once=True)
3234
async def on_ready(self):

src/utils/extensions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def check_func(
3939

4040

4141
# noinspection DuplicatedCode
42-
def validate_module(module: ModuleType, config: dict = None) -> None:
42+
def validate_module(module: ModuleType, config: dict[str, Any] | None = None) -> None:
4343
"""
4444
Validate the module to ensure it has the required functions and attributes to be loaded as an extension
4545
:param module: The module to validate

0 commit comments

Comments
 (0)