def get_proporsals(source, offset, base='', dot=False):
 with RopeContext() as ctx:
  try:
   proposals = codeassist.code_assist(ctx.project, source, offset, ctx.resource, maxfixes=3, later_locals=False)
  except exceptions.ModuleSyntaxError:
   proposals = []
  proposals = sorted(proposals, key=_sort_proporsals)
  out = []
  preview = ('preview' in ctx.options.get('completeopt'))
  for p in proposals:
   out.append(dict(word=p.name, menu=p.type, kind=(p.scope + ':'), info=((p.get_doc() or 'No docs.') if preview else '')))
  out = _get_autoimport_proposals(out, ctx, source, offset, dot=dot)
 return out

def get_proporsals ( source , offset , base = '' , dot = False ) : with RopeContext ( ) as ctx : try : proposals = codeassist . code_assist ( ctx . project , source , offset , ctx . resource , maxfixes = 3 , later_locals = False ) except exceptions . ModuleSyntaxError : proposals = [ ] proposals = sorted ( proposals , key = _sort_proporsals ) out = [ ] preview = ( 'preview' in ctx . options . get ( 'completeopt' ) ) for p in proposals : out . append ( dict ( word = p . name , menu = p . type , kind = ( p . scope + ':' ) , info = ( ( p . get_doc ( ) or 'No docs.' ) if preview else '' ) ) ) out = _get_autoimport_proposals ( out , ctx , source , offset , dot = dot ) return out
code assist .