mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 02:41:06 -05:00
Changing the relative import in core.py to use an absolute import path:
from videoarchiver.utils import progress_tracker Updated the main init.py to properly handle module reloading: Added 'videoarchiver.processor' and 'videoarchiver.processor.core' to modules_to_reload Added explicit import and reload of the processor module These changes ensure that: The progress_tracker is properly imported from the utils package All necessary modules are reloaded during initialization Circular imports are avoided The package structure maintains proper dependency flow
This commit is contained in:
@@ -11,6 +11,8 @@ from redbot.core.bot import Red
|
||||
modules_to_reload = [
|
||||
'videoarchiver.utils.exceptions',
|
||||
'videoarchiver.utils',
|
||||
'videoarchiver.processor',
|
||||
'videoarchiver.processor.core',
|
||||
'videoarchiver.core.commands.settings_commands',
|
||||
'videoarchiver.core.commands.archiver_commands',
|
||||
'videoarchiver.core.commands.database_commands'
|
||||
@@ -25,6 +27,10 @@ for module in modules_to_reload:
|
||||
from . import utils
|
||||
importlib.reload(utils)
|
||||
|
||||
# Import and reload processor
|
||||
from . import processor
|
||||
importlib.reload(processor)
|
||||
|
||||
from .core.base import VideoArchiver
|
||||
from .core.initialization import initialize_cog, init_callback
|
||||
from .core.cleanup import cleanup_resources
|
||||
|
||||
@@ -10,7 +10,7 @@ from discord.ext import commands
|
||||
|
||||
from .message_handler import MessageHandler
|
||||
from .queue_handler import QueueHandler
|
||||
from ..utils import progress_tracker
|
||||
from videoarchiver.utils import progress_tracker
|
||||
from .status_display import StatusDisplay
|
||||
from .cleanup_manager import CleanupManager, CleanupStrategy
|
||||
from .constants import REACTIONS
|
||||
|
||||
Reference in New Issue
Block a user