mirror of
https://github.com/davidhalter/jedi.git
synced 2026-09-18 17:03:13 +08:00
more improvements, so that almost all import tests pass again
This commit is contained in:
@@ -587,7 +587,7 @@ class Evaluator(object):
|
|||||||
current = next(path)
|
current = next(path)
|
||||||
|
|
||||||
if isinstance(current, pr.Array):
|
if isinstance(current, pr.Array):
|
||||||
result = [er.Array(current)]
|
result = [er.Array(self, current)]
|
||||||
else:
|
else:
|
||||||
if isinstance(current, pr.NamePart):
|
if isinstance(current, pr.NamePart):
|
||||||
# This is the first global lookup.
|
# This is the first global lookup.
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ class ImportPath(pr.Base):
|
|||||||
scope, rest = self._follow_file_system()
|
scope, rest = self._follow_file_system()
|
||||||
except ModuleNotFound:
|
except ModuleNotFound:
|
||||||
debug.warning('Module not found: ' + str(self.import_stmt))
|
debug.warning('Module not found: ' + str(self.import_stmt))
|
||||||
self._evaluator.follow_statement.pop_stmt()
|
self._evaluator.recursion_detector.pop_stmt()
|
||||||
return []
|
return []
|
||||||
|
|
||||||
scopes = [scope]
|
scopes = [scope]
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ class Execution(Executable):
|
|||||||
for listener in func.listeners:
|
for listener in func.listeners:
|
||||||
listener.execute(self._get_params())
|
listener.execute(self._get_params())
|
||||||
if func.is_generator and not evaluate_generator:
|
if func.is_generator and not evaluate_generator:
|
||||||
return [Generator(func, self.var_args)]
|
return [Generator(self._evaluator, func, self.var_args)]
|
||||||
else:
|
else:
|
||||||
"""
|
"""
|
||||||
stmts = docstrings.find_return_types(func)
|
stmts = docstrings.find_return_types(func)
|
||||||
|
|||||||
Reference in New Issue
Block a user