mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 10:51:05 -05:00
fix(processor): add fallback to absolute imports in core.py
This commit is contained in:
@@ -8,10 +8,18 @@ from typing import Any, ClassVar, Dict, List, Optional, Tuple, TYPE_CHECKING
|
|||||||
import discord # type: ignore
|
import discord # type: ignore
|
||||||
from discord.ext import commands # type: ignore
|
from discord.ext import commands # type: ignore
|
||||||
|
|
||||||
from ..core.types import ComponentState, ProcessorState, ComponentStatus
|
try:
|
||||||
from .constants import REACTIONS
|
# Try relative imports first
|
||||||
from ..utils import progress_tracker
|
from ..core.types import ComponentState, ProcessorState, ComponentStatus
|
||||||
from ..utils.exceptions import ProcessorError
|
from .constants import REACTIONS
|
||||||
|
from ..utils import progress_tracker
|
||||||
|
from ..utils.exceptions import ProcessorError
|
||||||
|
except ImportError:
|
||||||
|
# Fall back to absolute imports if relative imports fail
|
||||||
|
from videoarchiver.core.types import ComponentState, ProcessorState, ComponentStatus
|
||||||
|
from videoarchiver.processor.constants import REACTIONS
|
||||||
|
from videoarchiver.utils import progress_tracker
|
||||||
|
from videoarchiver.utils.exceptions import ProcessorError
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .cleanup_manager import CleanupManager
|
from .cleanup_manager import CleanupManager
|
||||||
|
|||||||
Reference in New Issue
Block a user