mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +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
|
||||
|
||||
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):
|
||||
test = self.current
|
||||
|
||||
@@ -141,6 +141,7 @@ class ImportPath(object):
|
||||
scope, rest = self._follow_file_system()
|
||||
except ModuleNotFound:
|
||||
debug.warning('Module not found: ' + str(self.import_stmt))
|
||||
evaluate.follow_statement.pop_stmt()
|
||||
return []
|
||||
|
||||
scopes = [scope]
|
||||
|
||||
@@ -10,6 +10,7 @@ sys.path.append('.')
|
||||
|
||||
from _compatibility import is_py25
|
||||
import api
|
||||
|
||||
#api.set_debug_function(api.debug.print_to_stdout)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user