1
0
forked from VimPlug/jedi

removed vim exceptions

This commit is contained in:
David Halter
2012-06-27 20:41:38 +02:00
parent 19a5d788c4
commit 2e2e360567
3 changed files with 6 additions and 5 deletions

View File

@@ -661,7 +661,7 @@ class Generator(object):
return self.func.parent return self.func.parent
#self.execution.get_return_types() #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 # TODO check if this method is right here, this means that Generators
# can be indexed, which is not the Python way. # can be indexed, which is not the Python way.
return Execution(self.func).get_return_types(True) return Execution(self.func).get_return_types(True)

View File

@@ -7,7 +7,7 @@ functions.debug.ignored_modules = ['parsing', 'builtin']
#functions.debug.ignored_modules = ['parsing', 'builtin', 'evaluate', 'modules'] #functions.debug.ignored_modules = ['parsing', 'builtin', 'evaluate', 'modules']
functions.modules.builtin.module_find_path.insert(0, '.') functions.modules.builtin.module_find_path.insert(0, '.')
f_name = 'parsetest.py' f_name = 'functions.py'
#f_name = 'test/completion/classes.py' #f_name = 'test/completion/classes.py'
import os import os
path = os.path.join(os.getcwd(), f_name) path = os.path.join(os.getcwd(), f_name)
@@ -15,7 +15,7 @@ path = os.path.join(os.getcwd(), f_name)
f = open(path) f = open(path)
code = f.read() code = f.read()
for i in range(1): 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.get_definitions(code, 181, 2, path)
#completions = functions.complete(code, 42, 200, path) #completions = functions.complete(code, 42, 200, path)

View File

@@ -41,7 +41,7 @@ if 1:
out.append(d) out.append(d)
strout = str(out) strout = str(out)
except Exception: except (Exception, evaluate.MultiLevelAttributeError):
# print to stdout, will be in :messages # print to stdout, will be in :messages
print(traceback.format_exc()) print(traceback.format_exc())
strout = '' strout = ''
@@ -67,7 +67,7 @@ if 1:
definitions = functions.get_definitions(source, row, column, buf_path) definitions = functions.get_definitions(source, row, column, buf_path)
except functions.NotFoundError: except functions.NotFoundError:
msg = 'There is no useful expression under the cursor' msg = 'There is no useful expression under the cursor'
except Exception: except (Exception, evaluate.MultiLevelAttributeError):
# print to stdout, will be in :messages # print to stdout, will be in :messages
print(traceback.format_exc()) print(traceback.format_exc())
msg = "Some different eror, this shouldn't happen" 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 traceback # for exception output
import functions import functions
import evaluate
PYTHONEOF PYTHONEOF
" vim: set et ts=4: " vim: set et ts=4: