fixed imports again

This commit is contained in:
pacnpal
2024-11-18 01:21:40 +00:00
parent d03e8dc8e8
commit fc06e54d8a
37 changed files with 879 additions and 882 deletions

View File

@@ -4,24 +4,25 @@ import logging
from pathlib import Path
from typing import TYPE_CHECKING, Dict, Any, Optional
try:
# Try relative imports first
from ..utils.download_core import DownloadCore
from ..utils.message_manager import MessageManager
from ..utils.file_ops import cleanup_downloads
from ..utils.exceptions import VideoArchiverError as ProcessingError
except ImportError:
# Fall back to absolute imports if relative imports fail
# from videoarchiver.utils.download_core import DownloadCore
# from videoarchiver.utils.message_manager import MessageManager
# from videoarchiver.utils.file_ops import cleanup_downloads
# from videoarchiver.utils.exceptions import VideoArchiverError as ProcessingError
# try:
# Try relative imports first
from ..utils.download_core import DownloadCore
from ..utils.message_manager import MessageManager
from ..utils.file_ops import cleanup_downloads
from ..utils.exceptions import VideoArchiverError as ProcessingError
# except ImportError:
# Fall back to absolute imports if relative imports fail
# from videoarchiver.utils.download_core import DownloadCore
# from videoarchiver.utils.message_manager import MessageManager
# from videoarchiver.utils.file_ops import cleanup_downloads
# from videoarchiver.utils.exceptions import VideoArchiverError as ProcessingError
if TYPE_CHECKING:
try:
from .base import VideoArchiver
except ImportError:
# from videoarchiver.core.base import VideoArchiver
# try:
from .base import VideoArchiver
# except ImportError:
# from videoarchiver.core.base import VideoArchiver
logger = logging.getLogger("VideoArchiver")