1
0
forked from VimPlug/jedi

chore: remove unnecessary for loop

This commit is contained in:
Kirat Singh
2021-10-06 13:15:20 +00:00
parent 53e837055f
commit d872eef1a7

View File

@@ -422,18 +422,13 @@ def import_module(inference_state, import_names, parent_module_value, sys_path):
# The module might not be a package. # The module might not be a package.
return NO_VALUES return NO_VALUES
for i, path in enumerate(paths):
if not isinstance(path, list):
path = paths[i:]
file_io_or_ns, is_pkg = inference_state.compiled_subprocess.get_module_info( file_io_or_ns, is_pkg = inference_state.compiled_subprocess.get_module_info(
string=import_names[-1], string=import_names[-1],
path=path, path=paths,
full_name=module_name, full_name=module_name,
is_global_search=False, is_global_search=False,
) )
if is_pkg is not None: if is_pkg is None:
break
else:
return NO_VALUES return NO_VALUES
if isinstance(file_io_or_ns, ImplicitNSInfo): if isinstance(file_io_or_ns, ImplicitNSInfo):