1
0
forked from VimPlug/jedi

Another Python2 fix

This commit is contained in:
Dave Halter
2019-04-05 12:20:46 +02:00
parent 02b01a8bc3
commit 7ccc0d9d7b

View File

@@ -166,12 +166,7 @@ class Evaluator(object):
@evaluator_function_cache()
def typing_module(self):
typing_module, = self.import_module((u'typing',))
try:
return typing_module.stub_context
except AttributeError:
# Python 2 and 3.4: In some cases there is no non-stub module,
# because the module was not installed with `pip install typing`.
return typing_module
return typing_module.stub_context or typing_module
def reset_recursion_limitations(self):
self.recursion_detector = recursion.RecursionDetector()