diff --git a/app/tasks/watch_folder_tasks.py b/app/tasks/watch_folder_tasks.py index f01feabd..cbd4338a 100644 --- a/app/tasks/watch_folder_tasks.py +++ b/app/tasks/watch_folder_tasks.py @@ -16,6 +16,7 @@ import json import logging import os from datetime import datetime, timedelta, timezone +from typing import Any import redis from celery import shared_task @@ -1429,7 +1430,7 @@ def _scan_user_watch_folder( # --------------------------------------------------------------------------- # Maps source_type values to their per-user scan functions. -_USER_WF_CLOUD_HANDLERS: dict[str, callable] = {} # populated after function defs +_USER_WF_CLOUD_HANDLERS: dict[str, Any] = {} # populated after function defs def _scan_user_s3_folder( diff --git a/tests/test_watch_folder_tasks.py b/tests/test_watch_folder_tasks.py index 72a08423..40bc2d22 100644 --- a/tests/test_watch_folder_tasks.py +++ b/tests/test_watch_folder_tasks.py @@ -3950,7 +3950,9 @@ class TestPullUserIntegrationWatchFolders: @patch("app.tasks.watch_folder_tasks._scan_user_watch_folder", return_value=4) @patch("app.tasks.watch_folder_tasks._load_cache", return_value={}) @patch("app.tasks.watch_folder_tasks._save_cache") - def test_local_source_type_uses_local_scanner(self, mock_save, mock_load, mock_scan_local, mock_session_factory): + def test_local_source_type_dispatches_to_local_scanner( + self, mock_save, mock_load, mock_scan_local, mock_session_factory + ): """Explicit source_type 'local' should use the local filesystem scanner.""" from app.tasks.watch_folder_tasks import _pull_user_integration_watch_folders