From 0e99c33c675e3a645c9cf137ed66eccae4ef38c7 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sun, 10 Mar 2013 01:31:31 +0100 Subject: [PATCH] Don't use NotFoundError in _func_call_and_param_index This makes it simpler. --- jedi/api.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/jedi/api.py b/jedi/api.py index dff1e7e9..00a39691 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -447,23 +447,15 @@ class Script(object): if repr(old_call) == repr(call): # return the index of the part_parser return old_call, index - return None, 0 - else: - raise NotFoundError() + return None, 0 debug.speed('func_call start') call = None index = 0 if settings.use_function_definition_cache: - try: - call, index = check_cache() - except NotFoundError: - pass + call, index = check_cache() if call is None: - try: - call, index = check_user_stmt(self._parser.user_stmt) - except NotFoundError: - pass + call, index = check_user_stmt(self._parser.user_stmt) debug.speed('func_call parsed') return call, index