'Get a formatted calltip and docstring from Rope'

def get_info(self, info):

    if (self.project is None):
        return
    filename = info['filename']
    source_code = info['source_code']
    offset = info['position']
    if PY2:
        filename = filename.encode('utf-8')
    else:
        pass
    try:
        resource = rope.base.libutils.path_to_resource(self.project, filename)
    except Exception as _error:
        if DEBUG_EDITOR:
            log_last_error(LOG_FILENAME, ('path_to_resource:    %r' % filename))
        resource = None
    try:
        if DEBUG_EDITOR:
            t0 = time.time()
        cts = rope.contrib.codeassist.get_calltip(self.project, source_code, offset, resource, ignore_unknown=False, remove_self=True, maxfixes=3)
        if DEBUG_EDITOR:
            log_dt(LOG_FILENAME, 'get_calltip', t0)
        if (cts is not None):
            while ('..' in cts):
                cts = cts.replace('..', '.')
            if ('(.)' in cts):
                cts = cts.replace('(.)', '(...)')
        try:
            doc_text = rope.contrib.codeassist.get_doc(self.project, source_code, offset, resource, maxfixes=3)
            if DEBUG_EDITOR:
                log_dt(LOG_FILENAME, 'get_doc', t0)
        except Exception as _error:
            doc_text = ''
            if DEBUG_EDITOR:
                log_last_error(LOG_FILENAME, 'get_doc')
        return self.handle_info(cts, doc_text, source_code, offset)
    except Exception as _error:
        if DEBUG_EDITOR:
            log_last_error(LOG_FILENAME, 'get_calltip_text')
