Converted all 'from videoarchiver.' imports to relative imports

This commit is contained in:
pacnpal
2024-11-17 16:05:12 +00:00
parent c830be2841
commit 62c97f0b01
69 changed files with 417 additions and 359 deletions

View File

@@ -3,8 +3,8 @@
from typing import Dict, Any, Optional, Union, List, Tuple
import discord
from videoarchiver.processor.core import VideoProcessor
from videoarchiver.processor.constants import (
from .processor.core import VideoProcessor
from .processor.constants import (
REACTIONS,
ReactionType,
ReactionEmojis,
@@ -12,7 +12,7 @@ from videoarchiver.processor.constants import (
get_reaction,
get_progress_emoji
)
from videoarchiver.processor.url_extractor import (
from .processor.url_extractor import (
URLExtractor,
URLMetadata,
URLPattern,
@@ -21,7 +21,7 @@ from videoarchiver.processor.url_extractor import (
URLValidator,
URLMetadataExtractor
)
from videoarchiver.processor.message_validator import (
from .processor.message_validator import (
MessageValidator,
ValidationContext,
ValidationRule,
@@ -32,15 +32,15 @@ from videoarchiver.processor.message_validator import (
ValidationCacheEntry,
ValidationError
)
from videoarchiver.processor.message_handler import MessageHandler
from videoarchiver.processor.queue_handler import QueueHandler
from videoarchiver.processor.reactions import (
from .processor.message_handler import MessageHandler
from .processor.queue_handler import QueueHandler
from .processor.reactions import (
handle_archived_reaction,
update_queue_position_reaction,
update_progress_reaction,
update_download_progress_reaction
)
from videoarchiver.utils import progress_tracker
from .utils import progress_tracker
# Export public classes and constants
__all__ = [

View File

@@ -18,9 +18,9 @@ from typing import (
)
from datetime import datetime, timedelta
from videoarchiver.processor.queue_handler import QueueHandler
from videoarchiver.ffmpeg.ffmpeg_manager import FFmpegManager
from videoarchiver.utils.exceptions import CleanupError
from .processor.queue_handler import QueueHandler
from .ffmpeg.ffmpeg_manager import FFmpegManager
from .utils.exceptions import CleanupError
logger = logging.getLogger("VideoArchiver")

View File

@@ -8,17 +8,17 @@ from datetime import datetime, timedelta
import discord
from discord.ext import commands
from videoarchiver.processor.message_handler import MessageHandler
from videoarchiver.processor.queue_handler import QueueHandler
from videoarchiver.utils import progress_tracker
from videoarchiver.processor.status_display import StatusDisplay
from videoarchiver.processor.cleanup_manager import CleanupManager, CleanupStrategy
from videoarchiver.processor.constants import REACTIONS
from videoarchiver.queue.manager import EnhancedVideoQueueManager
from videoarchiver.ffmpeg.ffmpeg_manager import FFmpegManager
from videoarchiver.database.video_archive_db import VideoArchiveDB
from videoarchiver.config_manager import ConfigManager
from videoarchiver.utils.exceptions import ProcessorError
from .processor.message_handler import MessageHandler
from .processor.queue_handler import QueueHandler
from .utils import progress_tracker
from .processor.status_display import StatusDisplay
from .processor.cleanup_manager import CleanupManager, CleanupStrategy
from .processor.constants import REACTIONS
from .queue.manager import EnhancedVideoQueueManager
from .ffmpeg.ffmpeg_manager import FFmpegManager
from .database.video_archive_db import VideoArchiveDB
from .config_manager import ConfigManager
from .utils.exceptions import ProcessorError
logger = logging.getLogger("VideoArchiver")

View File

@@ -8,13 +8,13 @@ from datetime import datetime, timedelta
import discord
from discord.ext import commands
from videoarchiver.processor.url_extractor import URLExtractor, URLMetadata
from videoarchiver.processor.message_validator import MessageValidator, ValidationError
from videoarchiver.processor.queue_processor import QueueProcessor, QueuePriority
from videoarchiver.processor.constants import REACTIONS
from videoarchiver.queue.manager import EnhancedVideoQueueManager
from videoarchiver.config_manager import ConfigManager
from videoarchiver.utils.exceptions import MessageHandlerError
from .processor.url_extractor import URLExtractor, URLMetadata
from .processor.message_validator import MessageValidator, ValidationError
from .processor.queue_processor import QueueProcessor, QueuePriority
from .processor.constants import REACTIONS
from .queue.manager import EnhancedVideoQueueManager
from .config_manager import ConfigManager
from .utils.exceptions import MessageHandlerError
logger = logging.getLogger("VideoArchiver")

View File

@@ -7,7 +7,7 @@ from typing import Dict, Optional, Tuple, List, Any, Callable, Set, TypedDict, C
from datetime import datetime
import discord
from videoarchiver.utils.exceptions import ValidationError
from .utils.exceptions import ValidationError
logger = logging.getLogger("VideoArchiver")

View File

@@ -8,14 +8,14 @@ from typing import Optional, Dict, Any, List, Tuple, Set, TypedDict, ClassVar, C
from datetime import datetime
import discord
from videoarchiver.utils import progress_tracker
from videoarchiver.database.video_archive_db import VideoArchiveDB
from videoarchiver.utils.download_manager import DownloadManager
from videoarchiver.utils.message_manager import MessageManager
from videoarchiver.utils.exceptions import QueueHandlerError
from videoarchiver.queue.models import QueueItem
from videoarchiver.config_manager import ConfigManager
from videoarchiver.processor.constants import REACTIONS
from .utils import progress_tracker
from .database.video_archive_db import VideoArchiveDB
from .utils.download_manager import DownloadManager
from .utils.message_manager import MessageManager
from .utils.exceptions import QueueHandlerError
from .queue.models import QueueItem
from .config_manager import ConfigManager
from .processor.constants import REACTIONS
logger = logging.getLogger("VideoArchiver")

View File

@@ -7,11 +7,11 @@ from typing import List, Optional, Dict, Any, Set, Union, TypedDict, ClassVar
from datetime import datetime
import discord
from videoarchiver.queue.models import QueueItem
from videoarchiver.queue.manager import EnhancedVideoQueueManager
from videoarchiver.processor.constants import REACTIONS
from videoarchiver.processor.url_extractor import URLMetadata
from videoarchiver.utils.exceptions import QueueProcessingError
from .queue.models import QueueItem
from .queue.manager import EnhancedVideoQueueManager
from .processor.constants import REACTIONS
from .processor.url_extractor import URLMetadata
from .utils.exceptions import QueueProcessingError
logger = logging.getLogger("VideoArchiver")

View File

@@ -7,8 +7,8 @@ from typing import List, Optional
import discord
from urllib.parse import urlparse
from videoarchiver.processor.constants import REACTIONS, ReactionType, get_reaction, get_progress_emoji
from videoarchiver.database.video_archive_db import VideoArchiveDB
from .processor.constants import REACTIONS, ReactionType, get_reaction, get_progress_emoji
from .database.video_archive_db import VideoArchiveDB
logger = logging.getLogger("VideoArchiver")

View File

@@ -7,7 +7,7 @@ from datetime import datetime
from typing import Dict, Any, List, Optional, Callable, TypeVar, Union, TypedDict, ClassVar, Tuple
import discord
from videoarchiver.utils.exceptions import DisplayError
from .utils.exceptions import DisplayError
logger = logging.getLogger("VideoArchiver")