# Path: mu/interface/panes.py
# CHARTS = True
# 
# Path: mu/logic.py
# class Device:
#     """
#     Device object, containing both information about the connected device,
#     the port it's connected through and the mode it works with.
#     """
# 
#     def __init__(
#         self,
#         vid,
#         pid,
#         port,
#         serial_number,
#         manufacturer,
#         long_mode_name,
#         short_mode_name,
#         board_name=None,
#     ):
#         self.vid = vid
#         self.pid = pid
#         self.port = port
#         self.serial_number = serial_number
#         self.manufacturer = manufacturer
#         self.long_mode_name = long_mode_name
#         self.short_mode_name = short_mode_name
#         self.board_name = board_name
# 
#     @property
#     def name(self):
#         """
#         Returns the device name.
#         """
#         if self.board_name:
#             return self.board_name
#         else:
#             return _("{} compatible").format(self.long_mode_name)
# 
#     def __eq__(self, other):
#         """
#         Equality on devices. Comparison on vid, pid, and serial_number,
#         and most importantly also matches on which port the device is
#         connected to. That is, if two identical devices are connected
#         to separate ports they are considered different.
#         """
#         return (
#             isinstance(other, self.__class__)
#             and self.pid == other.pid
#             and self.vid == other.vid
#             and self.port == other.port
#             and self.serial_number == other.serial_number
#         )
# 
#     def __ne__(self, other):
#         """
#         Inequality of devices is the negation of equality
#         """
#         return not self.__eq__(other)
# 
#     def __lt__(self, other):
#         """
#         Alphabetical ordering according to device name
#         """
#         return self.name < other.name
# 
#     def __gt__(self, other):
#         """
#         Alphabetical ordering according to device name
#         """
#         return self.name > other.name
# 
#     def __le__(self, other):
#         """
#         Alphabetical ordering according to device name
#         """
#         return self.name <= other.name
# 
#     def __ge__(self, other):
#         """
#         Alphabetical ordering according to device name
#         """
#         return self.name >= other.name
# 
#     def __str__(self):
#         """
#         String representation of devices includes name, port, and VID/PID
#         """
#         s = "{} on {} (VID: 0x{:04X}, PID: 0x{:04X})"
#         return s.format(self.name, self.port, self.vid, self.pid)
# 
#     def __hash__(self):
#         """
#         Hash is the hash of the string representation, includes the same
#         elements in the hash as in equality testing.
#         """
#         return hash(str(self))


import os
import ctypes
import logging
from subprocess import check_output
from mu.modes.base import MicroPythonMode
from mu.modes.api import ADAFRUIT_APIS, SHARED_APIS
from mu.interface.panes import CHARTS
from mu.logic import Device
from adafruit_board_toolkit import circuitpython_serial
        "sys",
        "terminalio",
        "time",
        "touchio",
        "uheap",
        "usb_cdc",
        "usb_hid",
        "usb_midi",
        "ustack",
        "vectorio",
        "watchdog",
        "wifi",
        "wiznet",
        "zlib",
    }

    def actions(self):
        """
        Return an ordered list of actions provided by this module. An action
        is a name (also used to identify the icon) , description, and handler.
        """
        buttons = [
            {
                "name": "serial",
                "display_name": _("Serial"),
                "description": _("Open a serial connection to your device."),
                "handler": self.toggle_repl,
                "shortcut": "CTRL+Shift+U",
            }
        ]

# Path: mu/interface/panes.py
# CHARTS = True
# 
# Path: mu/logic.py
# class Device:
#     """
#     Device object, containing both information about the connected device,
#     the port it's connected through and the mode it works with.
#     """
# 
#     def __init__(
#         self,
#         vid,
#         pid,
#         port,
#         serial_number,
#         manufacturer,
#         long_mode_name,
#         short_mode_name,
#         board_name=None,
#     ):
#         self.vid = vid
#         self.pid = pid
#         self.port = port
#         self.serial_number = serial_number
#         self.manufacturer = manufacturer
#         self.long_mode_name = long_mode_name
#         self.short_mode_name = short_mode_name
#         self.board_name = board_name
# 
#     @property
#     def name(self):
#         """
#         Returns the device name.
#         """
#         if self.board_name:
#             return self.board_name
#         else:
#             return _("{} compatible").format(self.long_mode_name)
# 
#     def __eq__(self, other):
#         """
#         Equality on devices. Comparison on vid, pid, and serial_number,
#         and most importantly also matches on which port the device is
#         connected to. That is, if two identical devices are connected
#         to separate ports they are considered different.
#         """
#         return (
#             isinstance(other, self.__class__)
#             and self.pid == other.pid
#             and self.vid == other.vid
#             and self.port == other.port
#             and self.serial_number == other.serial_number
#         )
# 
#     def __ne__(self, other):
#         """
#         Inequality of devices is the negation of equality
#         """
#         return not self.__eq__(other)
# 
#     def __lt__(self, other):
#         """
#         Alphabetical ordering according to device name
#         """
#         return self.name < other.name
# 
#     def __gt__(self, other):
#         """
#         Alphabetical ordering according to device name
#         """
#         return self.name > other.name
# 
#     def __le__(self, other):
#         """
#         Alphabetical ordering according to device name
#         """
#         return self.name <= other.name
# 
#     def __ge__(self, other):
#         """
#         Alphabetical ordering according to device name
#         """
#         return self.name >= other.name
# 
#     def __str__(self):
#         """
#         String representation of devices includes name, port, and VID/PID
#         """
#         s = "{} on {} (VID: 0x{:04X}, PID: 0x{:04X})"
#         return s.format(self.name, self.port, self.vid, self.pid)
# 
#     def __hash__(self):
#         """
#         Hash is the hash of the string representation, includes the same
#         elements in the hash as in equality testing.
#         """
#         return hash(str(self))


# Path: mu/modes/circuitpython.py
import os
import ctypes
import logging
from subprocess import check_output
from mu.modes.base import MicroPythonMode
from mu.modes.api import ADAFRUIT_APIS, SHARED_APIS
from mu.interface.panes import CHARTS
from mu.logic import Device
from adafruit_board_toolkit import circuitpython_serial

        "sys",
        "terminalio",
        "time",
        "touchio",
        "uheap",
        "usb_cdc",
        "usb_hid",
        "usb_midi",
        "ustack",
        "vectorio",
        "watchdog",
        "wifi",
        "wiznet",
        "zlib",
    }

    def actions(self):
        """
        Return an ordered list of actions provided by this module. An action
        is a name (also used to identify the icon) , description, and handler.
        """
        buttons = [
            {
                "name": "serial",
                "display_name": _("Serial"),
                "description": _("Open a serial connection to your device."),
                "handler": self.toggle_repl,
                "shortcut": "CTRL+Shift+U",
            }
        ]

        if CHARTS: