mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-15 05:01:57 +08:00
Fix tensorflow issues with a few hacks (temporary), fixes #1195
This commit is contained in:
@@ -105,6 +105,9 @@ class Evaluator(object):
|
||||
self.is_analysis = False
|
||||
self.project = project
|
||||
self.access_cache = {}
|
||||
# This setting is only temporary to limit the work we have to do with
|
||||
# tensorflow and others.
|
||||
self.infer_enabled = True
|
||||
|
||||
self.reset_recursion_limitations()
|
||||
self.allow_different_encoding = True
|
||||
@@ -123,6 +126,9 @@ class Evaluator(object):
|
||||
return self.project._get_sys_path(self, environment=self.environment)
|
||||
|
||||
def eval_element(self, context, element):
|
||||
if not self.infer_enabled:
|
||||
return NO_CONTEXTS
|
||||
|
||||
if isinstance(context, CompForContext):
|
||||
return eval_node(context, element)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user