@@ -52,7 +52,7 @@ async def download_file(
5252
5353 # Mock download_file so we don't actually try to download files.
5454 mcs = get_content_scanner ()
55- mcs .file_downloader .download_file = self .downloader_mock # type: ignore[assignment ]
55+ mcs .file_downloader .download_file = self .downloader_mock # type: ignore[method-assign ]
5656 self .scanner = mcs .scanner
5757
5858 async def test_scan (self ) -> None :
@@ -161,7 +161,7 @@ async def test_cache_max_size_mismatching_hash(self) -> None:
161161 """
162162 # Mock the _run_scan command so we can keep track of its call count.
163163 mock_runner = Mock (return_value = 0 )
164- self .scanner ._run_scan = mock_runner # type: ignore[assignment ]
164+ self .scanner ._run_scan = mock_runner # type: ignore[method-assign ]
165165
166166 # Calculate the cache key for this file so we can look it up later.
167167 cache_key = self .scanner ._get_cache_key_for_file (MEDIA_PATH , None , None )
@@ -269,7 +269,7 @@ async def test_dont_cache_exit_codes(self) -> None:
269269 # It's tricky to give a value to `scanner._script` that makes `_run_scan` return 5
270270 # directly, so we just mock it here.
271271 run_scan_mock = Mock (return_value = 5 )
272- self .scanner ._run_scan = run_scan_mock # type: ignore[assignment ]
272+ self .scanner ._run_scan = run_scan_mock # type: ignore[method-assign ]
273273
274274 # Scan the file, we'll check later that it wasn't cached.
275275 with self .assertRaises (FileDirtyError ):
@@ -318,7 +318,7 @@ async def _scan_file(*args: Any) -> MediaDescription:
318318 return self .downloader_res
319319
320320 scan_mock = Mock (side_effect = _scan_file )
321- self .scanner ._scan_file = scan_mock # type: ignore[assignment ]
321+ self .scanner ._scan_file = scan_mock # type: ignore[method-assign ]
322322
323323 # Request two scans of the same file at the same time.
324324 results = await asyncio .gather (
0 commit comments