@@ -133,7 +133,8 @@ def test_one_arg(fake_path: list[str], case: list[str]) -> None:
133
133
expected = [join (chroot , "a" ), * fake_path ]
134
134
135
135
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 , [])
137
138
]
138
139
139
140
assert sys .path == fake_path
@@ -157,7 +158,8 @@ def test_two_similar_args(fake_path: list[str], case: list[str]) -> None:
157
158
expected = [join (chroot , "a" ), * fake_path ]
158
159
159
160
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 , [])
161
163
]
162
164
163
165
assert sys .path == fake_path
@@ -183,7 +185,8 @@ def test_more_args(fake_path: list[str], case: list[str]) -> None:
183
185
] + fake_path
184
186
185
187
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 , [])
187
190
]
188
191
189
192
assert sys .path == fake_path
@@ -1242,7 +1245,7 @@ def test_import_sibling_module_from_namespace(initialized_linter: PyLinter) -> N
1242
1245
"""
1243
1246
)
1244
1247
os .chdir ("namespace" )
1245
- extra_sys_paths = [ expand_modules .discover_package_path (tmpdir , [])]
1248
+ extra_sys_paths = expand_modules .discover_package_path (tmpdir , [])
1246
1249
1247
1250
# Add the parent directory to sys.path
1248
1251
with lint .augmented_sys_path (extra_sys_paths ):
@@ -1267,7 +1270,7 @@ def test_lint_namespace_package_under_dir_on_path(initialized_linter: PyLinter)
1267
1270
with tempdir () as tmpdir :
1268
1271
create_files (["namespace_on_path/submodule1.py" ])
1269
1272
os .chdir (tmpdir )
1270
- extra_sys_paths = [ expand_modules .discover_package_path (tmpdir , [])]
1273
+ extra_sys_paths = expand_modules .discover_package_path (tmpdir , [])
1271
1274
with lint .augmented_sys_path (extra_sys_paths ):
1272
1275
linter .check (["namespace_on_path" ])
1273
1276
assert linter .file_state .base_name == "namespace_on_path"
0 commit comments