Using TYPE_CHECKING for type hints

Moving runtime imports to appropriate locations
Using string literal type annotations
Importing shared utilities through the utils package
This commit is contained in:
pacnpal
2024-11-17 21:24:49 +00:00
parent e997c6f6b9
commit 439cf5ff07
5 changed files with 32 additions and 17 deletions

View File

@@ -15,10 +15,13 @@ from typing import (
Callable,
Awaitable,
Tuple,
TYPE_CHECKING,
)
from datetime import datetime, timedelta
from ..processor.queue_handler import QueueHandler
if TYPE_CHECKING:
from ..processor.queue_handler import QueueHandler
from ..ffmpeg.ffmpeg_manager import FFmpegManager
from ..utils.exceptions import CleanupError
@@ -192,7 +195,7 @@ class CleanupManager:
def __init__(
self,
queue_handler: QueueHandler,
queue_handler: "QueueHandler",
ffmpeg_mgr: Optional[FFmpegManager] = None,
strategy: CleanupStrategy = CleanupStrategy.NORMAL,
) -> None: