1+ from collections .abc import Iterable
12from pathlib import Path
2- from typing import Iterable , List , Optional , Tuple , Type
3+ from typing import Optional
34from unittest import mock
45
56import pytest
@@ -157,7 +158,7 @@ def test_help(params):
157158 ),
158159 ],
159160)
160- def test_without_file (params : List [str ]):
161+ def test_without_file (params : list [str ]):
161162 runner = CliRunner ()
162163 result = runner .invoke (unblob .cli .cli , params )
163164 assert result .exit_code == 2
@@ -238,7 +239,7 @@ def test_archive_success(
238239 expected_randomness_depth : int ,
239240 expected_process_num : int ,
240241 expected_verbosity : int ,
241- expected_progress_reporter : Type [ProgressReporter ],
242+ expected_progress_reporter : type [ProgressReporter ],
242243 tmp_path : Path ,
243244):
244245 runner = CliRunner ()
@@ -254,9 +255,10 @@ def test_archive_success(
254255 process_file_mock = mock .MagicMock ()
255256 logger_config_mock = mock .MagicMock ()
256257 new_params = [* params , "--extract-dir" , str (tmp_path ), str (in_path )]
257- with mock .patch .object (
258- unblob .cli , "process_file" , process_file_mock
259- ), mock .patch .object (unblob .cli , "configure_logger" , logger_config_mock ):
258+ with (
259+ mock .patch .object (unblob .cli , "process_file" , process_file_mock ),
260+ mock .patch .object (unblob .cli , "configure_logger" , logger_config_mock ),
261+ ):
260262 result = runner .invoke (unblob .cli .cli , new_params )
261263 assert result .exit_code == 0
262264 assert "error" not in result .output
@@ -285,7 +287,7 @@ def test_archive_success(
285287 ],
286288)
287289def test_keep_extracted_chunks (
288- args : List [str ], keep_extracted_chunks : bool , fail_message : str , tmp_path : Path
290+ args : list [str ], keep_extracted_chunks : bool , fail_message : str , tmp_path : Path
289291):
290292 runner = CliRunner ()
291293 in_path = (
@@ -321,7 +323,7 @@ def test_keep_extracted_chunks(
321323 ],
322324)
323325def test_skip_extension (
324- skip_extension : List [str ], expected_skip_extensions : Tuple [str , ...], tmp_path : Path
326+ skip_extension : list [str ], expected_skip_extensions : tuple [str , ...], tmp_path : Path
325327):
326328 runner = CliRunner ()
327329 in_path = (
@@ -355,7 +357,7 @@ def test_skip_extension(
355357 ],
356358)
357359def test_skip_extraction (
358- args : List [str ], skip_extraction : bool , fail_message : str , tmp_path : Path
360+ args : list [str ], skip_extraction : bool , fail_message : str , tmp_path : Path
359361):
360362 runner = CliRunner ()
361363 in_path = (
@@ -403,7 +405,7 @@ def test_skip_extraction(
403405 ],
404406)
405407def test_clear_skip_magics (
406- args : List [str ], skip_magic : Iterable [str ], fail_message : str , tmp_path : Path
408+ args : list [str ], skip_magic : Iterable [str ], fail_message : str , tmp_path : Path
407409):
408410 runner = CliRunner ()
409411 in_path = (
0 commit comments