Skip to content

[BUG FIX]: Implicit import errors & cog_load method of MonthlyYappathon - #149

Open
Jiggly-Balls wants to merge 8 commits into
masterfrom
feature/execution-update
Open

[BUG FIX]: Implicit import errors & cog_load method of MonthlyYappathon#149
Jiggly-Balls wants to merge 8 commits into
masterfrom
feature/execution-update

Conversation

@Jiggly-Balls

@Jiggly-Balls Jiggly-Balls commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Description of your PR

This PR fixes the cog_load method in src.bot.cogs.features.MonthlyYapathon from a sync method to an async method. Also fixes the implicit import type error by making all project level imports from relative & implicit relative to absolute imports.

Due to this I had to also update the extension loading slightly and the final run command of the bot in Dockerfile-bot. Additionally I also added a BaseCog class which comes with some logging when the cogs gets loaded / unloaded.

Describe your changes

Added

  • Added src.bot.cogs.BaseCog file which comes with some logging.

Fixed

  • Fixed cog_load method of MonthlyYappathon from sync to async.
  • Fixed type errors of reportImplicitRelativeImport

Changed

  • Updated extension loading in src/bot/main.py

Issue link

Closes #147
Closes #148

Checklist

  • Does an issue of this PR exist and have you linked it?
  • Have your ran pre-commit over your PR?
  • Was this PR branched off from master?
  • Is this PR merging to master?

@Jiggly-Balls
Jiggly-Balls requested a review from Xarlos89 June 9, 2026 18:19
@Jiggly-Balls Jiggly-Balls self-assigned this Jun 9, 2026
@Jiggly-Balls Jiggly-Balls added chore repo/project maintenance type checking Fixes to type annotation errors labels Jun 9, 2026

@Xarlos89 Xarlos89 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, but I think you missed the API dockerfile

Comment thread src/api/api.py
from routes.settings import settings
from werkzeug.exceptions import HTTPException

from src.api.__logger__ import setup_logger

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing was changed in the API startup command in the dockerfile. Does this actually work without changing the startup command?? No way

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I remember testing long ago. It should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore repo/project maintenance type checking Fixes to type annotation errors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Fix implicit import type checking error [BUG] Fix sync cog_unload method of MonthlyYappathon Cog

2 participants