def set_status(view):
    infos = []
    exts = ['ino', 'pde', 'cpp', 'c', '.S']
    file_name = view.file_name()
    if file_name and exts in file_name.split('.')[-1]:
        arduino_info = st_base.get_arduino_info()
        version_name = arduino_info.get_ide_dir().get_version_name()
        version_text = 'Arduino %s' % version_name
        infos.append(version_text)

        target_board_info = arduino_info.get_target_board_info()
        target_board = target_board_info.get_target_board()
        if target_board:
            target_board_caption = target_board.get_caption()
            infos.append(target_board_caption)

            if target_board.has_options():
                target_sub_boards = target_board_info.get_target_sub_boards()
                for index, target_sub_board in enumerate(target_sub_boards):
                    caption_text = target_sub_board.get_caption()
                    if index == 0:
                        caption_text = '[' + caption_text
                    if index == len(target_sub_boards) - 1:
                        caption_text += ']'
                    infos.append(caption_text)
        else:
            target_board_caption = 'No board'
            infos.append(target_board_caption)

        settings = st_base.get_settings()
        target_serial_port = settings.get('serial_port', 'No serial port')
        serial_ports = pyarduino.base.serial_port.list_serial_ports()
        if not target_serial_port in serial_ports:
            target_serial_port = 'No serial port'
        serial_text = 'on %s' % target_serial_port
        infos.append(serial_text)

        text = ', '.join(infos)
        view.set_status('Arduino', text)
dataset/ETHPy150Open Robot-Will/Stino/stino/main.py/set_status/swapped operands of `in`