forked from VimPlug/jedi
fix get_code method for Operator (still ugly, though)
This commit is contained in:
@@ -322,10 +322,10 @@ class Evaluator(object):
|
||||
# Only the first command is important, the rest should basically not
|
||||
# happen except in broken code (e.g. docstrings that aren't code).
|
||||
call = expression_list[0]
|
||||
if isinstance(call, (str, unicode)):
|
||||
call_path = [call]
|
||||
else:
|
||||
if isinstance(call, pr.Call):
|
||||
call_path = list(call.generate_call_path())
|
||||
else:
|
||||
call_path = [call]
|
||||
|
||||
scope = stmt.get_parent_until(pr.IsScope)
|
||||
pos = stmt.start_pos
|
||||
|
||||
@@ -30,7 +30,7 @@ def sys_path_with_modifications(module):
|
||||
try:
|
||||
exec_function(c % code, variables)
|
||||
except Exception:
|
||||
debug.warning('sys path detected, but failed to evaluate')
|
||||
debug.warning('sys.path manipulation detected, but failed to evaluate.')
|
||||
return None
|
||||
try:
|
||||
res = variables['result']
|
||||
|
||||
Reference in New Issue
Block a user