forked from VimPlug/jedi
removed vim exceptions
This commit is contained in:
@@ -661,7 +661,7 @@ class Generator(object):
|
||||
return self.func.parent
|
||||
#self.execution.get_return_types()
|
||||
|
||||
def get_index_types(self, index):
|
||||
def get_index_types(self, index=None):
|
||||
# TODO check if this method is right here, this means that Generators
|
||||
# can be indexed, which is not the Python way.
|
||||
return Execution(self.func).get_return_types(True)
|
||||
|
||||
4
ftest.py
4
ftest.py
@@ -7,7 +7,7 @@ functions.debug.ignored_modules = ['parsing', 'builtin']
|
||||
#functions.debug.ignored_modules = ['parsing', 'builtin', 'evaluate', 'modules']
|
||||
functions.modules.builtin.module_find_path.insert(0, '.')
|
||||
|
||||
f_name = 'parsetest.py'
|
||||
f_name = 'functions.py'
|
||||
#f_name = 'test/completion/classes.py'
|
||||
import os
|
||||
path = os.path.join(os.getcwd(), f_name)
|
||||
@@ -15,7 +15,7 @@ path = os.path.join(os.getcwd(), f_name)
|
||||
f = open(path)
|
||||
code = f.read()
|
||||
for i in range(1):
|
||||
completions = functions.complete(code, 180, 200, path)
|
||||
completions = functions.complete(code, 163, 200, path)
|
||||
#completions = functions.get_definitions(code, 181, 2, path)
|
||||
#completions = functions.complete(code, 42, 200, path)
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ if 1:
|
||||
out.append(d)
|
||||
|
||||
strout = str(out)
|
||||
except Exception:
|
||||
except (Exception, evaluate.MultiLevelAttributeError):
|
||||
# print to stdout, will be in :messages
|
||||
print(traceback.format_exc())
|
||||
strout = ''
|
||||
@@ -67,7 +67,7 @@ if 1:
|
||||
definitions = functions.get_definitions(source, row, column, buf_path)
|
||||
except functions.NotFoundError:
|
||||
msg = 'There is no useful expression under the cursor'
|
||||
except Exception:
|
||||
except (Exception, evaluate.MultiLevelAttributeError):
|
||||
# print to stdout, will be in :messages
|
||||
print(traceback.format_exc())
|
||||
msg = "Some different eror, this shouldn't happen"
|
||||
@@ -99,6 +99,7 @@ sys.path.insert(0, dirname(dirname(vim.eval('s:current_file'))))
|
||||
import traceback # for exception output
|
||||
|
||||
import functions
|
||||
import evaluate
|
||||
PYTHONEOF
|
||||
|
||||
" vim: set et ts=4:
|
||||
|
||||
Reference in New Issue
Block a user