@@ -133,7 +133,8 @@ def test_one_arg(fake_path: list[str], case: list[str]) -> None:
133133 expected = [join (chroot , "a" ), * fake_path ]
134134
135135 extra_sys_paths = [
136- expand_modules .discover_package_path (arg , []) for arg in case
136+ path for arg in case
137+ for path in expand_modules .discover_package_path (arg , [])
137138 ]
138139
139140 assert sys .path == fake_path
@@ -157,7 +158,8 @@ def test_two_similar_args(fake_path: list[str], case: list[str]) -> None:
157158 expected = [join (chroot , "a" ), * fake_path ]
158159
159160 extra_sys_paths = [
160- expand_modules .discover_package_path (arg , []) for arg in case
161+ path for arg in case
162+ for path in expand_modules .discover_package_path (arg , [])
161163 ]
162164
163165 assert sys .path == fake_path
@@ -183,7 +185,8 @@ def test_more_args(fake_path: list[str], case: list[str]) -> None:
183185 ] + fake_path
184186
185187 extra_sys_paths = [
186- expand_modules .discover_package_path (arg , []) for arg in case
188+ path for arg in case
189+ for path in expand_modules .discover_package_path (arg , [])
187190 ]
188191
189192 assert sys .path == fake_path
@@ -1242,7 +1245,7 @@ def test_import_sibling_module_from_namespace(initialized_linter: PyLinter) -> N
12421245"""
12431246 )
12441247 os .chdir ("namespace" )
1245- extra_sys_paths = [ expand_modules .discover_package_path (tmpdir , [])]
1248+ extra_sys_paths = expand_modules .discover_package_path (tmpdir , [])
12461249
12471250 # Add the parent directory to sys.path
12481251 with lint .augmented_sys_path (extra_sys_paths ):
@@ -1267,7 +1270,7 @@ def test_lint_namespace_package_under_dir_on_path(initialized_linter: PyLinter)
12671270 with tempdir () as tmpdir :
12681271 create_files (["namespace_on_path/submodule1.py" ])
12691272 os .chdir (tmpdir )
1270- extra_sys_paths = [ expand_modules .discover_package_path (tmpdir , [])]
1273+ extra_sys_paths = expand_modules .discover_package_path (tmpdir , [])
12711274 with lint .augmented_sys_path (extra_sys_paths ):
12721275 linter .check (["namespace_on_path" ])
12731276 assert linter .file_state .base_name == "namespace_on_path"
0 commit comments