1
0
forked from VimPlug/jedi

create a helpers module to push some api functions into it (make the api code easier to read.

This commit is contained in:
Dave Halter
2014-01-28 23:26:50 +01:00
parent 2175416684
commit 9cfa8fead0
2 changed files with 25 additions and 20 deletions

17
jedi/api/helpers.py Normal file
View File

@@ -0,0 +1,17 @@
"""
Helpers for the API
"""
from jedi import debug
from jedi.evaluate import helpers
from jedi.parser import representation as pr
def func_call_and_param_index(user_stmt, position):
debug.speed('func_call start')
call, index = None, 0
if call is None:
if user_stmt is not None and isinstance(user_stmt, pr.Statement):
call, index, _ = helpers.search_call_signatures(user_stmt, position)
debug.speed('func_call parsed')
return call, index