def list_board_ports():
    board_ports = []
    serial_ports = list_serial_ports()
    for serial_port in serial_ports:
        board_name = resolve_device_attached_to(serial_port)
        label = serial_port
        if board_name:
            label += board_name % '(%s)'
        port = board_port.BoardPort()
        port.set_address(serial_port)
        port.set_protocol('serial')
        port.set_board_name(board_name)
        port.set_label(label)
        board_ports.append(port)
    return board_ports
dataset/ETHPy150Open Robot-Will/Stino/stino/pyarduino/base/serial_port.py/list_board_ports/swapped operands of `%`