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:
17
jedi/api/helpers.py
Normal file
17
jedi/api/helpers.py
Normal 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
|
||||
Reference in New Issue
Block a user