1
0
forked from VimPlug/jedi

Fix the weird py__path__ behavior

This commit is contained in:
Dave Halter
2019-08-21 23:08:42 +02:00
parent 592f3771fc
commit 2fb04db0ab
7 changed files with 49 additions and 54 deletions
+1 -6
View File
@@ -206,12 +206,7 @@ def _try_to_load_stub(inference_state, import_names, python_value_set,
# 4. Try to load pyi file somewhere if python_value_set was not defined.
if not python_value_set:
if parent_module_value is not None:
try:
method = parent_module_value.py__path__
except AttributeError:
check_path = []
else:
check_path = method()
check_path = parent_module_value.py__path__() or []
# In case import_names
names_for_path = (import_names[-1],)
else: