forked from VimPlug/jedi
chore: remove unnecessary for loop
This commit is contained in:
@@ -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):
|
file_io_or_ns, is_pkg = inference_state.compiled_subprocess.get_module_info(
|
||||||
if not isinstance(path, list):
|
string=import_names[-1],
|
||||||
path = paths[i:]
|
path=paths,
|
||||||
file_io_or_ns, is_pkg = inference_state.compiled_subprocess.get_module_info(
|
full_name=module_name,
|
||||||
string=import_names[-1],
|
is_global_search=False,
|
||||||
path=path,
|
)
|
||||||
full_name=module_name,
|
if is_pkg is None:
|
||||||
is_global_search=False,
|
|
||||||
)
|
|
||||||
if is_pkg is not None:
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
return NO_VALUES
|
return NO_VALUES
|
||||||
|
|
||||||
if isinstance(file_io_or_ns, ImplicitNSInfo):
|
if isinstance(file_io_or_ns, ImplicitNSInfo):
|
||||||
|
|||||||
Reference in New Issue
Block a user