mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 07:14:48 +08:00
Don't use NotFoundError in _func_call_and_param_index
This makes it simpler.
This commit is contained in:
@@ -448,22 +448,14 @@ class Script(object):
|
|||||||
# return the index of the part_parser
|
# return the index of the part_parser
|
||||||
return old_call, index
|
return old_call, index
|
||||||
return None, 0
|
return None, 0
|
||||||
else:
|
|
||||||
raise NotFoundError()
|
|
||||||
|
|
||||||
debug.speed('func_call start')
|
debug.speed('func_call start')
|
||||||
call = None
|
call = None
|
||||||
index = 0
|
index = 0
|
||||||
if settings.use_function_definition_cache:
|
if settings.use_function_definition_cache:
|
||||||
try:
|
|
||||||
call, index = check_cache()
|
call, index = check_cache()
|
||||||
except NotFoundError:
|
|
||||||
pass
|
|
||||||
if call is None:
|
if call is None:
|
||||||
try:
|
|
||||||
call, index = check_user_stmt(self._parser.user_stmt)
|
call, index = check_user_stmt(self._parser.user_stmt)
|
||||||
except NotFoundError:
|
|
||||||
pass
|
|
||||||
debug.speed('func_call parsed')
|
debug.speed('func_call parsed')
|
||||||
return call, index
|
return call, index
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user