mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-17 05:49:37 +08:00
Remove the recursion detection in imports, because it's not needed there anymore.
This commit is contained in:
@@ -68,11 +68,6 @@ class ImportWrapper(tree.Base):
|
|||||||
|
|
||||||
@memoize_default()
|
@memoize_default()
|
||||||
def follow(self, is_goto=False):
|
def follow(self, is_goto=False):
|
||||||
if self._evaluator.recursion_detector.push_stmt(self._import):
|
|
||||||
# check recursion
|
|
||||||
return set()
|
|
||||||
|
|
||||||
try:
|
|
||||||
module = self._evaluator.wrap(self._import.get_parent_until())
|
module = self._evaluator.wrap(self._import.get_parent_until())
|
||||||
import_path = self._import.path_for_name(self._name)
|
import_path = self._import.path_for_name(self._name)
|
||||||
from_import_name = None
|
from_import_name = None
|
||||||
@@ -116,8 +111,6 @@ class ImportWrapper(tree.Base):
|
|||||||
types = set(s.name for s in types)
|
types = set(s.name for s in types)
|
||||||
|
|
||||||
debug.dbg('after import: %s', types)
|
debug.dbg('after import: %s', types)
|
||||||
finally:
|
|
||||||
self._evaluator.recursion_detector.pop_stmt()
|
|
||||||
return types
|
return types
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -739,10 +739,11 @@ def _check_array_additions(evaluator, compare_array, module, is_list):
|
|||||||
# Check for recursion. Possible by using 'extend' in
|
# Check for recursion. Possible by using 'extend' in
|
||||||
# combination with function calls.
|
# combination with function calls.
|
||||||
continue
|
continue
|
||||||
|
try:
|
||||||
if compare_array in evaluator.eval_element(power):
|
if compare_array in evaluator.eval_element(power):
|
||||||
# The arrays match. Now add the results
|
# The arrays match. Now add the results
|
||||||
added_types |= check_additions(execution_trailer.children[1], add_name)
|
added_types |= check_additions(execution_trailer.children[1], add_name)
|
||||||
|
finally:
|
||||||
evaluator.recursion_detector.pop_stmt()
|
evaluator.recursion_detector.pop_stmt()
|
||||||
# reset settings
|
# reset settings
|
||||||
settings.dynamic_params_for_other_modules = temp_param_add
|
settings.dynamic_params_for_other_modules = temp_param_add
|
||||||
|
|||||||
Reference in New Issue
Block a user