'Decide if we want to autoinsert colons'

def autoinsert_colons(self):

    line_text = self.get_text('sol', 'cursor')
    if (not self.textCursor().atBlockEnd()):
        return False
    elif self.in_comment_or_string():
        return False
    elif (not self.__colon_keyword(line_text)):
        return False
    elif self.__forbidden_colon_end_char(line_text):
        return False
    elif self.__unmatched_braces_in_line(line_text):
        return False
    elif self.__has_colon_not_in_brackets(line_text):
        return False
    else:
        return True
