@staticmethod<EOL><INDENT>def complete(code, line, column, path, encoding, prefix):<DEDENT>
ret_val = []<EOL>try:<EOL><INDENT>script = jedi.Script(code, line + <NUM_LIT:1>, column, path, encoding)<EOL>completions = script.completions()<EOL>print('<STR_LIT>' % completions)<EOL><DEDENT>except jedi.NotFoundError:<EOL><INDENT>completions = []<EOL><DEDENT>for completion in completions:<EOL><INDENT>ret_val.append({<EOL>'<STR_LIT:name>': completion.name,<EOL>'<STR_LIT>': icon_from_typename(<EOL>completion.name, completion.type),<EOL>'<STR_LIT>': completion.description})<EOL><DEDENT>return ret_val<EOL>
Completes python code using `jedi`_.

:returns: a list of completion.