mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 23:04:48 +08:00
fixed bug in recursion detection (not really a fix, I don't understand why this happens only in python3)
This commit is contained in:
@@ -36,7 +36,10 @@ class RecursionDecorator(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def pop_stmt(self):
|
def pop_stmt(self):
|
||||||
self.current = self.current.parent
|
if self.current is not None:
|
||||||
|
# I don't know how current can be None, but sometimes it happens
|
||||||
|
# with Python3.
|
||||||
|
self.current = self.current.parent
|
||||||
|
|
||||||
def _check_recursion(self):
|
def _check_recursion(self):
|
||||||
test = self.current
|
test = self.current
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ class ImportPath(object):
|
|||||||
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))
|
||||||
|
evaluate.follow_statement.pop_stmt()
|
||||||
return []
|
return []
|
||||||
|
|
||||||
scopes = [scope]
|
scopes = [scope]
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ sys.path.append('.')
|
|||||||
|
|
||||||
from _compatibility import is_py25
|
from _compatibility import is_py25
|
||||||
import api
|
import api
|
||||||
|
|
||||||
#api.set_debug_function(api.debug.print_to_stdout)
|
#api.set_debug_function(api.debug.print_to_stdout)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user